Wednesday, May 25, 2011

change java version / JDK of a weblogic domain

1> Take a backup and edit <DOMAIN_HOME>\bin\setDomainEnv.sh /.cmd

after the lines:
set WL_HOME=D:\work\wls\wlserver_10.3
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set BEA_JAVA_HOME=D:\work\wls\jrockit_160_17_R28.0.0-679

set SUN_JAVA_HOME=D:\work\wls\jdk160_18

add the line
set JAVA_VENDOR=Oracle     for jrockit
set JAVA_VENDOR=Sun        for sun jdk

so the setDomainEnv.sh or setDomainEnv.cmd will look like below for jrockit

set WL_HOME=D:\work\wls\wlserver_10.3
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set BEA_JAVA_HOME=D:\work\wls\jrockit_160_17_R28.0.0-679

set SUN_JAVA_HOME=D:\work\wls\jdk160_18

set JAVA_VENDOR=Oracle

if "%JAVA_VENDOR%"=="Oracle" (


However if you have JVM tuning parameters set in your startup scripts, you would have to set the corresponding jvm parameters of the new java.
so in that case its best create a new domain with above changes, else you can do the changes in current domain.

2> else look for the below lines in setdomainenv.sh

# We need to reset the value of JAVA_HOME to get it shortened AND
# we can not shorten it above because immediate variable expansion will blank it

under the above lines add the new jdk path and vendor so the result would be like

# We need to reset the value of JAVA_HOME to get it shortened AND
# we can not shorten it above because immediate variable expansion will blank it
JAVA_HOME="/u01/CR-root/Oracle/Middleware/combinedjdk/jdk1.6.0_37"
JAVA_VENDOR="Sun"
export JAVA_HOME
export JAVA_VENDOR

save it in vi mode as esc:wq

ref : Doc ID 1058804.1

Wednesday, May 11, 2011

Weblogic server takes long to start

Only on server present in the domain and it took more then 45mins to come up.

Have deleted the cache present in tmp, cache & stage folders within user_projects\domains\<DOMAIN>\servers\<myserver> after stopping the server.
Also 2GB diagnostics file under /user_projects/domains/DOMAIN_NAME/servers/SERVER_NAME/data/store/diagnostics.
The server is now fine.