Search Results


Friday, May 06, 2016

Weblogic Tips

Some common weblogic tasks


Setting CLASSPATH


in Windows

Append the following lines to the file $DOMAIN_HOME/bin/setDomainEnv.cmd
CLASSPATH=%CLASSPATH%;%DOMAIN_HOME%/Properties


in Unix

Append the following lines to the file $DOMAIN_HOME/bin/setDomainEnv.sh
CLASSPATH="${CLASSPATH}${CLASSPATHSEP}${DOMAIN_HOME}/Properties"
export CLASSPATH


Normally files stored in the domain home could be accessed without having to set class path, this example is just for illustration.

Setting Boot.properties


You could set username and password in the properties files so that you dont have to enter weblogic credentials every time the server is started. It has to be done for every server

create a folder security under $domain_home/servers/AdminServer
create a new file boot.properties and enter the following

username=weblogic
password=welcome1

The clear text password will be automatically changed to encrypted one when the weblogic starts up for the first time


Script to Start and Stop servers


Startup Script

#!/bin/bash

cd /d01/fmw1213/oracle_common/common/bin

./wlst.sh<<ThisIsTheEnd
nmConnect('nodemanager','welcome1','wlHostname','5556','soa_domain','/u01/app/oracle/config/domains/soa_domain')
nmStart('AdminServer')

ThisIsTheEnd

exit 0


Shutdown Script

#!/bin/bash

cd /d01/fmw1213/oracle_common/common/bin

./wlst.sh<<ThisIsTheEnd
nmConnect('nodemanager','welcome1','wlHostname','5556','soa_domain','/u01/app/oracle/config/domains/soa_domain')
nmKill('AdminServer')

ThisIsTheEnd

exit 0




Script to Start and Stop NodeManager

Startup Script

#!/bin/bash

cd /d01/fmw1213/oracle_common/common/bin

./wlst.sh<<ThisIsTheEnd

startNodeManager(verbose='true',NodeManagerHome='/d01/fmw1213/config/domains/soa_domain/nodemanager',ListenPort='5556',ListenAddress='wlHostname')

ThisIsTheEnd

exit 0


Shutdown Script

#!/bin/bash

cd /d01/fmw1213/oracle_common/common/bin

./wlst.sh<<ThisIsTheEnd

nmConnect('nodemanager','welcome1','wlHostname','5556','soasit_domain','/d01/fmw1213/config/domains/soa_domain')
stopNodeManager()


ThisIsTheEnd

exit 0



Managing Log files


Refer this link


Decrypt Weblogic passwords


Refer this link


How to increase heap space and permgen space?


Refer this link




Wednesday, May 04, 2016

Testing network connectivity from Salesforce

One of the challenges with consuming the web-service from SalesForce is that lack of tools, like telnet and ping, to test the network connectivity.

But luckily we code execute anonymous code in SalesForce from Developer console. Here are the steps to test web-service from sales-force.

Register URL 


All the URLs must be registered in SalesForce remote site settings before being called by the code.

  • Go to Setup > Security Controls > Remote Site Settings
  • Click on New Remote Site, enter the following and click Save
    • Remote Site Name: XX_TEST
    • Remote Site URL: http://domainhost/
  • Click Save


SalesForce Test Code


  • Go to the Developer Console 
  • Navigate Debug > Open Execute Anonymous Window  (Ctrl + E)
  • Execute the following code
  • Logs should show up in the Query Results Window


String soapEndpoint = 'https://blabla/test';
String soapBody = 'soap envelope';

HttpRequest req = new HttpRequest();
Http http = new Http();
HttpResponse resp = new HttpResponse();
req.setEndpoint(soapEndpoint);

//add Request header
req.setMethod('POST');
req.setHeader('Content-type', 'text/xml; charset=utf-8');
req.setHeader('SOAPAction', 'namesspace for wsdl');
req.setBody(soapBody);
System.debug(soapBody);

// add the endpoint to the request
try {
System.debug('Sending request');
resp = http.send(req);
System.debug(resp.toString());
System.debug(resp.getBody());
}  catch(System.CalloutException e) {
System.debug('Callout error: '+ e);
}