Sunday, November 29, 2015

WLS: Change JVM (JDK/JRockit) - Linux

Following post will help you to upgrade/change the JDK used by an Oracle WebLogic Server to a newer version.
  • Upgrade JDK:
  1. Make sure new JDK version is certified with Weblogic version and other products installed in the same domain.
  2. Install New JDK.
  3. Shutdown Weblogic domain
  4. Modify all occurrences of the original JDK directory path value with the new JDK directory path value for the files listed below.

  5. Note 1: Take backup of below mentioned files before change.
    Note 2: Following command will help you find list of files referring to JAVA_HOME
    find . -type f -name "*.sh" -exec grep -il JAVA_HOME {} \;

    11g:
    ----
    • MW_HOME/wlserver_10.3/common/bin/commEnv.sh
    • MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.properties
    • MW_HOME/utils/bsu/bsu.sh
    • MW_HOME/utils/quickstart/quickstart.sh
    • MW_HOME/utils/uninstall/uninstall.sh
    • MW_HOME/wlserver_10.3/.product.properties
    • DOMAIN_HOME/user_projects/domains/<mydomain>/bin/setDomainEnv.sh

    12c:
    ----
    • MW_HOME/install/envVars.properties
    • MW_HOME/oracle_common/common/bin/commEnv.sh
    • MW_HOME/oracle_common/common/bin/setHomeDirs.sh
    • MW_HOME/oui/bin/compareInventory.sh
    • MW_HOME/oui/bin/install.sh
    • MW_HOME/oui/bin/viewInventory.sh
    • MW_HOME/wlserver/.product.properties
    • DOMAIN_HOME/bin/setDomainEnv.sh
    • DOMAIN_HOME/nodemanager/nodemanager.properties

  6. Clear cache and tmp folders resides in each server folder.

  7. Note: Incase Weblogic version is 10.3.6 and the targetJDK version is JAVA 7 (version 1.7.0_x),following jar files needs to be copied manually from $MW_HOME/modules to the directory $JAVA_HOME/jre/lib/endorsed

    • javax.annotation_1.0.0.0_1-0.jar
    • javax.xml.bind_2.1.1.jar
    • javax.xml.ws_2.1.1.jar

  8. Startup Weblogic domain

  9. Simple way: You can install new JDK and rename new JDK folder name to old JDK name to skip JAVA_HOME path update in all the files mentioned in step 4.
  • Change JRockit to JDK and Vice-versa:
    Refer below steps along with above mentioned JDK upgrade steps.
  1. Refer below 2 steps and update following two files as needed:
    • setDomainEnv.sh
    • commEnv.sh
  2. If you are changing from JRockit  to JDK:
  3. JAVA_HOME="/usr/bin/jdk1.6.0_31"
    JAVA_VENDOR="Sun"
    export JAVA_HOME
    export JAVA_VENDOR
  4. If you are changing from JDK  to JRockit:
  5. JAVA_HOME="/usr/bin/jrockit_28.1"
    JAVA_VENDOR="Oracle"
    export JAVA_HOME
    export JAVA_VENDOR

Refer to Oracle Security Alerts page to get latest patch updates.

1 comment:

  1. I learned installing Java successfully and created my first mobile app a few days ago, and it was truly a fun experience. I did it under the guidance of Java experts.

    ReplyDelete

Provide your thoughts !