Saturday 14 October 2017

blogger

java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 while extending the WLS domain with ESS

Hello Viewer,

I got the requirement where i was suppose to extend the existing 12.2.1.0.0 WLS domain with ESS scheduling service component. While going through the  configuration wizard , on Gridlink DS page
below error popped up.

"java.lang.ArrayIndexOutOfBoundsException: 0 >= 0"

After seeing the configuration wizard logs the issue boils down to below error,

com.oracle.cie.wizard.domain.gui.tasks.JdbcRacDatasourceConfigurationGUITask - Error occurred in task [com.oracle.cie.wizard.domain.gui.tasks.JdbcRacDatasourceConfigurationGUITask] execution. Domain has no data sources to configure.


Solution:

This is actually a BUG in 12.2.1.0.0 WLS. This can be resolved by applying the patch  24287145

Thanks a lot for your patience!!
Thanks and Regards
-Ashish

Wednesday 15 June 2016

blogger
[WLS 12.2.1.0.0] Managed servers going to FORCE_SHUTTING_DOWN state when resumed from ADMIN state.

Hello Viewer,

I have noticed one of the weird behavior in wls 12.2.1.0.0 version , where in when we start the server and in case any of the datasource do not come up because of associated database issue(database down or any other related issue). In that case server will stuck to Admin state which is normal behavior but when we will try to resume it from console it will again go to shutdown state.

Workaround: 

Reduce the initial connection capacity for datasource to ZERO.

Thanks a lot for your patience!!!

Regards
-Ashish


Friday 10 June 2016

blogger

Failed to initialize the application "SB_JMS_Proxy_N7de264e1.N2efb99d.2.1553951a327.N7ffe" due to error weblogic.management.DeploymentException: Exception occured while downloading files

Hello Viewer,

Today i faced one issue while bringing up the OSB servers.Servers were not coming up. After reaching to Admin state it again went to force shutting down mode.

After seeing the logs i got the below error:

 <Error> <Deployer> <BEA-149205> <Failed to initialize the application "SB_JMS_Proxy_N7de264e1.N2efb99d.2.1553951a327.N7ffe" due to error weblogic.management.DeploymentException: Exception occured while downloading files
weblogic.management.DeploymentException: Exception occured while downloading files
        at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:50)
        at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:59)
        at w
        Truncated. see log file for complete stacktrace
Caused By: java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from Administration Server for deployment request "0". Underlying error is: "null"


Solution: Login to Admin console and goto deployments, search the ear for which you are facing the error, it should be in failed state.
It will not allow you to untarget this ear.just delete it from deployments and try to restart the server. This time servers should come up.

Thanks a lot for your patience!!!

Regards
-Ashish




Wednesday 1 June 2016

blogger

com.bea.console.exceptions.DeploymentConfigurationInitIncompleteException


Hello Viewer,

I opened the weblogic admin console and clicked on SAP Adapter  under deployments.it showed me the below error:

com.bea.console.exceptions.DeploymentConfigurationInitIncompleteException

Reason: This error came because disk space was full.you can check it by running the below command. "df -kh"

Solution: Clear the disk space and restart the Admin server and Managed server.

Note: Admin server restart is must to resolve this error.

Thanks a lot for your patience!!!

Regards
-Ashish

Sunday 29 May 2016

blogger

[WLS 12.2.1.0.0]Script to get the email notification in case current or pending messages on distributed queues are greater than zero on any of the JMS server.

Hello Viewer,

I wanted to get the notification in case current or pending messages on distributed queues are greater than zero on any of the JMS server.
One easy way for this is to create watches and Notification under WLDF. But since i am using weblogic version 12.2.1.0.0, it is not easy to create policy for this task as rule expression tab is not present in 12.2.1.0.0 when policy type is "collected metric".

So i thought of creating the script which can constantly monitor the set of queues and will send an email notification having html content with proper cosmetics :)
Below are the steps to be followed:

1) Create a file QueueReport.sh with below content:

----------------------------------------------------------------------------------------------------------
#!/bin/sh
# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="wl_home"
cd /MyLocation/QueueReport
rm QueueReport.txt
umask 027
   echo "CHECKING QUEUE STATUS " > finalStatus3.out
    while read LINE; do
      date >> QueueReport.txt
      queue=$(echo "$LINE" | awk -F, '{ print $1 }');

    sh ${WL_HOME}/common/bin/wlst.sh /MyLocation/QueueReport/QueueReport.py $queue >> QueueReport.txt
    done < QueueList.txt
cat QueueReport.txt | grep "queue/topic" >> finalStatus3.out
grep -v "is 0 and 0" finalStatus3.out > temp.txt
mv temp.txt finalStatus3.out
echo "CHECKED QUEUE STATUS " >> finalStatus3.out
----------------------------------------------------------------------------------------------------------

2) Create a file QueueReport.py with below content:


Note: I am assuming there are two Managed server and two JMS server targeted to each managed server respectively.
 Change the below values according to your ennvironment.

jms_module name: JMS_TST_MODULE
jms server name :  JMS_TST_SERVER1,  JMS_TST_SERVER2
managed server name:  SOA_MS1,  SOA_MS2

-----------------------------------------------------------------------------------------------------------
import ConfigParser

def connectToServer():
        USERNAME = 'username'
        PASSWORD = 'password'
        URL='t3://Adminhost:Adminport'
        #Connect to the Administration Server
        print 'starting the script ....'
        connect(USERNAME,PASSWORD,URL)

def disconnectFromServer():
    print "Disconnecting from the Admin Server"
    disconnect()
    print "Exiting from the Admin Server"
    exit()
    print "Mission Accomplished"

def readConfigurationFile(myDestinationName):
    try:
          cd('ServerRuntimes/SOA_MS1/JMSRuntime/SOA_MS1.jms/JMSServers/JMS_TST_SERVER1/Destinations/JMS_TST_MODULE!JMS_TST_SERVER1@'+myDestinationName)
        current1=str(cmo.getMessagesCurrentCount());
        pending1=str(cmo.getMessagesPendingCount());
      cd('ServerRuntimes/SOA_MS2/JMSRuntime/SOA_MS2.jms/JMSServers/JMS_TST_SERVER2/Destinations/JMS_TST_MODULE!JMS_TST_SERVER2@'+myDestinationName)
        current2=str(cmo.getMessagesCurrentCount());
        pending2=str(cmo.getMessagesPendingCount());
        totalcurrent = int(current1) + int(current2)
        totalpending = int(pending1) + int(pending2)

        print 'The number of current/pending  messages on JMSServer in the queue/topic '+myDestinationName+' is '+str(totalcurrent)+' and '+str(totalpending)
    except :
        print 'Unable to find admin server...'
        exit()

    print 'Command executed successfully'

###############     Main Script   #####################################
#Conditionally import wlstModule only when script is executed with jython
if __name__ == '__main__':
    from wlstModule import *#@UnusedWildImport
print('This will enable you to give report for JMS Queues')
connectToServer()
readConfigurationFile(sys.argv[1])
####################################
----------------------------------------------------------------------------------------------------------------

3) Create a file QueueList.txt having the name of the queues that needs to be monitored.

----------------------------------------------------------------------------------------------------------------
queuename1
queuename2
queuename3
----------------------------------------------------------------------------------------------------------------

4) Create a file QueueMessageReport.sh with below content:

-----------------------------------------------------------------------------------------------------------------
#!/bin/bash
MAILTO=abc@gmail.com
MAILCC=abc@gmail.com
MAILFROM=abc@gmail.com
OUTPUT=/MyLocation/QueueReport/finalStatus.html

# Start the processes in parallel...
cd /MyLocation/QueueReport
sh QueueReport.sh

echo '<html>' > $OUTPUT
echo "<br /><b style='color:#ff0000'>Queue Status for SOA TESTR2</b> <br /><br />" >> $OUTPUT
COUNT=0
while read LINE ; do
    if [ "${LINE}" = "CHECKING QUEUE STATUS" ]; then
        echo "<table border=2 cellpadding=10 cellspacing=0>" >> $OUTPUT
        echo "<tr style='background-color:#787878;color:white;font-weight:bold'><td>Queue Name</td><td>JMS Server</td><td>Pending Message</td><td>Current Message</td></tr>" >> $OUTPUT
    elif [ "${LINE}" = "CHECKED QUEUE STATUS" ]; then
        echo "</table><br/><br/>" >> $OUTPUT
    else
       echo "<tr style='background-color:white;font-weight:bold'>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $11}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $7}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $15}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $13}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "</tr>" >> $OUTPUT
    fi
done < finalStatus3.out
grep -v "CHECKING QUEUE STATUS" finalStatus3.out > tempfile.txt
mv tempfile.txt finalStatus3.out
grep -v "CHECKED QUEUE STATUS" finalStatus3.out > tempfile1.txt
mv tempfile1.txt finalStatus3.out
if [[ -s finalStatus3.out ]] ; then
(
 #                       echo "From: $MAILFROM"; \
                        echo "To: abc@gmail.com"; \
                     #   echo "Cc: $MAILCC"; \
                        echo "Content-Type: text/html";\
                        echo "Subject: QueueReport"; \
                        echo ""; \
                       cat $OUTPUT; \
                ) | /usr/lib/sendmail -t
else
echo "FILE is empty."
fi ;
-----------------------------------------------------------------------------------------------------------------

How to Run:

Execute the below command:
sh QueueMessageReport.sh

Thanks a lot for your patience!!!

Regards
-Ashish

Saturday 28 May 2016

blogger

Password less authentication for SFTP/SSH between two host

Hello Viewer,

Below are the steps to establish password less authentication between two host.

Example :
you are on "machine1.info.company1.com" and you want password less authentication on "machine2.info1.company2.com" for user "shyam"

Follow the below steps:

1) Log in to "machine1.info.company1.com" with user "user1".

2)  Go to below directory:
     cd /home/user1/.ssh/

3) Generate public-private key pair using below command.
     ssh-keygen -t rsa

     Enter file in which to save the key (/home/web/.ssh/id_rsa):Press Enter
     Enter passphrase (empty for no passphrase): Press Enter
     Enter same passphrase again: Press Enter

     Your identification has been saved in /home/web/.ssh/id_rsa.
     Your public key has been saved in /home/web/.ssh/id_rsa.pub.

     Verify the date of the above files.

4) SSH to other machine and perform below steps.
    ssh shyam@machine2.info1.company2.com , enter the password
    cd /home/shyam
    Change .ssh directory to 700 permission
    cd .ssh
    Take the backup of authorized key folder
    Change authorized_keys to 600 permissions
    ctrl+C

5) Execute the below command:
    cat /home/user1/.ssh/id_rsa.pub | ssh shyam@machine2.info1.company2.com 'cat >> .ssh/authorized_keys'

6) Close the current session and again log in to "machine1.info.company1.com" with user "user1"

7) Try  ssh shyam@machine2.info1.company2.com
   
This time it should not ask for the password.

Thanks a lot for your patience!!!

Regards
-Ashish

Thursday 26 May 2016

blogger

[OSB 12c] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean

Hello viewer,

I was trying to create the scripts for performing different operation on OSB like deployment , enabling/disabling of proxy, list out the deployed OSB service etc..
Although i have already created these scripts for 11g version of OSB but the jars which i used in shell script are not working in 12c.

In 12c below jar are not available: [snippet from .sh file]
--------------------------------------------------------------------------------------------------------
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/sb-kernel-api.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/modules/com.bea.common.configfwk_1.2.1.0.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/alsb.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/sb-kernel-impl.jar
---------------------------------------------------------------------------------------------------------
when i tried to run the same script in 12c it was giving the error:

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean


 Solution:

write below command in your shell script(.sh file)

a) MW_HOME="middleware home where osb is installed"
    export MW_HOME

b). $MW_HOME/osb/tools/configjar/setenv.sh

DON'T miss the dot(.) in above command

c) ${MW_HOME}/osb/tools/configjar/wlst.sh  ${DIR_EXECUTION}/proxytask.py

use wlst.sh from this location   ${MW_HOME}/osb/tools/configjar



Thanks a lot for your patience!!!

Regards
-Ashish