Tuesday, August 27, 2019

Upgrade Java Version for OIM

Description: Demonstrates how to upgrade Java version for the OIM 11g R2 PS3 stack. A symbolic link is used to reference the new JDK. The example shows upgrading from Sun JDK 6 Update 38 to Oracle JDK 7 Update 171 on a Linux machine.





Tested On: WebLogic 10.3.6, Oracle Identity Manager 11.1.2.3.0, SOA 11.1.1.9.0,  BI Publisher 11.1.1.9.0

References: How to Install and Maintain the Java SE Installed or Used with FMW 11g/12c Products (Doc ID 1492980.1), All Java SE Downloads on MOS (Doc ID 1439822.1)

  1. Shutdown all WebLogic server instances (AdminServer, bi_server1, oim_server1, soa_server1, and etc.) and Node Manager processes.

  2. Download the desired Java version.
    Download: Oracle Support - All Java SE Downloads on MOS (Doc ID 1439822.1)
    Java Version: Oracle JDK 7 Update 171
    Platform: Linux x86-64
    File: p27217226_170171_Linux-x86-64.zip

  3. Unzip the JDK zip file. Then extract the TAR file into the desired directory.
    # Unzip JDK
    unzip p27217226_170171_Linux-x86-64.zip

    # Extract TAR into target java directory
    tar xvf jdk-7u171-linux-x64.tar.gz -C /home/oracle/java/

  4. Create a symbolic link to reference the new JDK.
    # Navigate to java directory
    cd /home/oracle/java/

    # Create a symbolic link called latest
    ln -sfn /home/oracle/java/jdk1.7.0_171/ latest


  5. Update the JAVA_HOME variable in bash profile to reference the new JDK.
    # Edit profile
    vi ~/.bash_profile
    export JAVA_HOME=/home/oracle/java/latest


    # Verify changes
    source ~/.bash_profile
    java -version
     

  6. Identify all the files that contain references to the old JDK. Replace OLD_JAVA_HOME with the absolute path of the old JDK.
    # Adjust variables accordingly
    export MW_HOME=/home/oracle/Oracle/Middleware
    export OLD_JAVA_HOME=/home/oracle/jdk1.6.0_38

    # Find references to the old JDK in all the sh, properties, and xml files
    find $MW_HOME -type f -name "*.sh" -exec grep -il $OLD_JAVA_HOME {} \;
    find $MW_HOME -type f -name "*.properties" -exec grep -il $OLD_JAVA_HOME {} \;
    find $MW_HOME -type f -name "*.xml" -exec grep -il $OLD_JAVA_HOME {} \;


  7. Update all files from step 6 using the Java symbolic link path to replace all the old JDK references.
    Java Symbolic Link Path: /home/oracle/java/latest

  8. Startup the Node Managers and WebLogic servers. Then verify that the latest JDK is being used.
    # Adjust variables accordingly
    export WL_HOME=/home/oracle/Oracle/Middleware/wlserver_10.3
    export DOMAIN_HOME=/home/oracle/Oracle/Middleware/user_projects/domains/oim_domain

    # Start Node Manager
    cd $WL_HOME/server/bin
    nohup sh startNodeManager.sh &

    # Start WebLogic AdminServer
    cd $DOMAIN_HOME/bin
    nohup sh startWebLogic.sh &

    # Use WebLogic console to start the managed servers
    Servers -> Control -> Check each managed server -> Click Start button

    # Verify the processes are using the JDK symbolic link
    ps -ef | grep NodeManager
    ps -ef | grep AdminServer
    ps -ef | grep soa_server
    ps -ef | grep oim_server


    # Verify the latest JDK is being used in WebLogic console
    Servers -> $WL_SERVER_INSTANCE -> Monitoring -> Java Version

  9. If there ever needs to be another Java upgrade, change the “latest” symbolic link to point to the new JDK.
    ln -sfn <Path to New JDK> latest

No comments:

Post a Comment