Hyperion Java 7 Update Script
Friday, May 8, 2020
1:01 PM
Purpose:
This script will update the JDK used by Hyperion / WebLogic from the included version, JDK 1.6.0.35,
to a specified newer version, currently and by convention version 1.7.0.181, in order to resolve a
known issue with WebLogic when migrated between PCA hosts. This iteration of the script is
designed for use with Oracle / Hyperion EPM System 11.1.2.4 servers housing Essbase and other
standard WebLogic-based EPM System components.
Overview:
The script will perform the following actions:
Download the current JDK archive from an internal repository
Create backups of all files to be modified
Unpack the JDK to the requisite location in the EPM system structure
Update all configuration files to point at the updated JDK
Create a log of files modified and actions taken
Prerequisites:
EPM System services must be halted prior to execution.
Directions:
Download script and place in D:\Hyperion\Scripts (Windows) or /u01/Hyperion/scripts/javaUpdate
(Linux). If using another path, update the script with the correct path. If transferring script to the
Linux machine from a Windows host, change to the directory containing the script, and run the
following commands:
chmod +x Java7Update_Linux.sh
dos2unix Java7Update_Linux.sh
This will ensure that the script is executable, and that the text formatting is set for Linux.
Configuration:
The script has two configuration points in Linux. Windows should need no changes, as it will
autodiscover the instance.
Runtime variable declaration:
#declare variables:
timestamp=$(date +%Y%m%d)
Sensitivit
y Label:
General
scriptDir=/u01/Hyperion/scripts/javaUpdate
MIDDLEWARE_HOME=/u01/Oracle/Middleware
EPM_INSTANCE_NAME=Essbase01
newJDK=jdk170_181
changelog=$scriptDir/changesMade.log
now=$(date)
Ensure that the scriptDir and MIDDLEWARE_HOME paths are accurate. Remember that Linux is
cAsE-sEnSiTiVe.
Confirm the EPM Instance name.
File target array:
#declare array with list of files to update:
declare -a updateList=(
$MIDDLEWARE_HOME/EPMSystem11R1/common/config/11.1.2.0/setJavaRuntime.sh
$MIDDLEWARE_HOME/user_projects/domains/EPMSystem/bin/setDomainEnv.sh
$MIDDLEWARE_HOME/user_projects/domains/EPMSystem/bin/setEpmEnv.sh
$MIDDLEWARE_HOME/wlserver_10.3/common/bin/commEnv.sh
$MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/config/OPMN/opmn/opmn.xml
$MIDDLEWARE_HOME/EPMSystem11R1/opmn/bin/opmnctl
$MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/bin/opmnctl
$MIDDLEWARE_HOME/EPMSystem11R1/opmn/bin/opmnctl.tmplt
$MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/EssbaseServer/essbaseserver1/
bin/essbase.cfg
$MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/EssbaseServer/essbaseserver1/
bin/setEssbaseEnv.sh
$(ls $MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/bin/deploymentScripts/*.sh)
In standard deployments, there should be no need to update anything in the file target array. In
some Essbase configurations, such as clustered deployments or nonstandard ARBORPATHs, the
following two entries may need to be updated:
$MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/EssbaseServer/essbaseserver1/
bin/essbase.cfg
$MIDDLEWARE_HOME/user_projects/$EPM_INSTANCE_NAME/EssbaseServer/essbaseserver1/
bin/setEssbaseEnv.sh
In the case of a nonstandard ARBORPATH, edit these entries to reflect the location of
$ARBORPATH/bin/essbase.cfg|setEssbaseEnv.sh.
Sensitivit
y Label:
General
Execution, Windows and Linux:
./Java7Update_Win.PS1 (In powershell, or right click the script and “Run with Powershell)
./Java7Update_Linux.sh (From the script directory)
The JDK archive will be downloaded and extracted, backups created, files updated, etc. Actions
taken will be written to the script’s change logs
$SCRIPTDIR\Java7Update.log (Windows)
$SCRIPTDIR/changesMade.log (Linux)
Script Deployment Scenarios – Abstract, Linux
This script is ultimately designed to address the WebLogic issues we see when migrating Linux VMs
to new PCAs. Coordinating the change windows allowed in a given environment vs. the PCA
migration schedule can be burdensome, and so these actions can be done synchronously, or be
done independently of one another. If being done together, the PCA can be migrated, and then this
script can be run in order to update the JDK. If being done separately, this script can be run ahead
of time, updating the JDK ahead of the PCA move. We have found that when the PCA is migrated
after the JDK has been updated, there is an additional issue that arises that is resolved by re-
extracting the JDK from the downloaded archive to the installation directory. The script does not
need to be run a second time, just the JDK extracted.
Java Update was applied before PCA Migration, Linux:
In the event that the script is run prior to the PCA migration and the JDK needs to be repaired, log
into the Linux host, halt EPM processes, and navigate to the script directory, in this case
/u01/Hyperion/scripts/javaUpdate.
Note that the script retains the archived JDK in its working directory, as well as the extracted JDK
directory.
Navigate to MIDDLEWARE_HOME, in this case /u01/Oracle/Middleware.
Note the jdk170_181 directory. Rename it.
Sensitivit
y Label:
General
mv /u01/Oracle/Middleware/jdk170_181 /u01/Oracle/Middleware/jdk170_181_bkp
Copy the JDK directory from the script directory to MIDDLEWARE_HOME.
cp -pr /u01/Hyperion/scripts/javaUpdate/jdk1.7.0_181 /u01/Oracle/Middleware/jdk170_181
Copy the cacerts file from the jdk backup directory to the current jdk directory.
mv /u01/Oracle/Middleware/jdk170_181/jre/lib/security/cacerts
/u01/Oracle/Middleware/jdk170_181/jre/lib/security/cacerts.bak
cp /u01/Oracle/Middleware/jdk170_181_bkp/jre/lib/security/cacerts
/u01/Oracle/Middleware/jdk170_181/jre/lib/security
Start EPM services per normal process.
Unpacking errors, Windows:
In limited cases, the “unzip” command has not worked from powershell for a windows server.
Ensure that the unpacking of the java folder was successful in cases of nonstandard windows
deployments. This will be reflected in the log and whether the Java folder shows up (D:\Oracle\
Middleware\jdk_170_181). This has only occurred on one server thus far, a dedicated DRM server.
Sensitivit
y Label:
General