2

I have a RHEL7 server with Oracle Java 8 and Weblogic 12 installed.

Java 8 was installed using an rpm from RedHat. Weblogic was installed using the installation package and instructions from Oracle (there was no rpm available from Redhat). During the Weblogic installation I supplied a symlink path as JAVA_HOME, /usr/lib/jvm/java-oracle. When weblogic was installed, the symlink chain was: /usr/lib/jvm/java-oracle --> /etc/alternatives/java_sdk_oracle --> /usr/lib/jvm/java-1.8.0-oracle-1.8.0.141-1jpp.1.el7_3.x86_64.

I tried patching the Java 8 installation from update 141 to update 161 by installing a newer rpm from RedHat. After that Weblogic wouldn't start.

After some research I found that the Weblogic installation script had resolved the symlinks and hardcoded the target, /usr/lib/jvm/java-1.8.0-oracle-1.8.0.141-1jpp.1.el7_3.x86_64 into several configuration files under the weblogic installation directory. The Java 8 update 161 installation removed update 141.

So it seems Java 8 and Weblogic have different opinions on how to locate Java.

Possible solutions:

  1. Modify the configuration files in the Weblogic installation after patching Java.

  2. Uninstall/reinstall Weblogic after patching Java.

  3. Don't patch java.

  4. other

Neither of the three first solutions seem very good.

What is the preferred way/best practice with regards to upgrading/patching java for Weblogic 12 on a Redhat server? Is there a better way?

1 Answers1

0

No one has provided an answer, so I'll just describe what we do.

It turns out WebLogic writes down the path to java both in the middleware installation and in the domain.

Finding the files that hold a reference to java:

find $MW_HOME -name commBaseEnv.sh
find $MW_HOME -name commEnv.sh
find $MW_HOME -name setNMJavaHome.sh
find $MW_HOME -name nodemanager.properties

find $DOMAIN_HOME -name setDomainEnv.sh
find $DOMAIN_HOME -name setNMJavaHome.sh
find $DOMAIN_HOME -name nodemanager.properties

MW_HOME is middleware home, the parent direcory of the wlserver directory.

DOMAIN_HOME is the home directory of your WebLogic domain.

We then updated the path in the configuration files obtained and replaced it with the path to the fixed location soft link to java created by the Oracle java RPM.

We need to do this whenever creating a new domain or when installing a new version of WebLogic.

We used this article to figure out what we needed to do.