(Cluster) Configuring your existing clustered environment to use Java 8
You need to configure the following files to update an existing WebSphere Commerce cluster to use IBM SDK, Java Technology Edition, Version 8.
Before you begin
Procedure
- Stop all WebSphere Commerce servers.
- Migrate your WebSphere Commerce cluster and search cluster environments.
-
For each existing WebSphere Commerce instance, complete the following steps.
-
Open the following file.
WC_installdir/instances/instance_name/xml/instance_name.xml
-
Search and replace all occurrences of WC_instance_name.ear with the
WC_instance_name.ear directory for WebSphere Application Server Version
8.5.
For example, search for
WAS7_installdir/profiles/profile_name/installedApps/WC_instance_name_cell/WC_instance_name.ear
Replace all instances withWAS85_installdir/profiles/profile_name/installedApps/WAS85_CellName/WC_instance_name.ear
- Save the changes.
-
Open the following file.
-
Complete the following steps for the WebSphere Commerce product.
- Open WC_installdir/xml/product.xml in a text editor.
-
Replace the WebSphere Application Server Version 7.0 installation path with the WebSphere
Application Server Version 8.5 installation path for the following entries.
- WebSphere Application Server
- IBM JDK
For example, search for occurrences of WAS7_installdir and replace it with WAS85_installdir. - Search and replace all instances of the old IBM HTTP Server V7 installation path with the new IBM HTTP Server V8.5 installation path.
- Save the file.
-
Update the setenv utility script.
-
Open the following file in a text editor.
- WC_installdir/bin/setenv.sh
- WC_installdir/bin/setenv.bat
-
Replace all occurrences of the WebSphere
Application Server Version 7.0 installation path
with the WebSphere Application Server Version 8.5
installation path in the following fields.
JAVA_HOME
WAS_HOME
WAS_PLUGIN_HOME
-
Search for
export WAS_HOME
, then add the following lines of code afterexport WAS_HOME
.REPLACE_WAS_HOME=$WAS_HOME export REPLACE_WAS_HOME
The following is an example of the updated code.export WAS_HOME REPLACE_WAS_HOME=$WAS_HOME export REPLACE_WAS_HOME # The following was added by an install action during fix pack install CURDIR=`pwd` cd $WAS_HOME/bin if [ "$OS_NAME" != "OS400" ]; then JVM_EXTRA_CMD_ARGS=`(. $WAS_HOME/bin/setupCmdLine.sh ' ';echo $JVM_EXTRA_CMD_ARGS)` else JVM_EXTRA_CMD_ARGS=`(. $WAS_HOME/bin/setupcmdline ' ';echo $JVM_EXTRA_CMD_ARGS)` fi
-
Add the following
WAS_ENDORSED_DIRS_JDK8
variable.
WAS_ENDORSED_DIRS_JDK8=$WAS_HOME/endorsed_apis:$WAS_HOME/runtimes/endorsed
-
Add -Djava.endorsed.dirs
path to JAVA_EXE.
JAVA_EXE="$JAVA_HOME/bin/java $JVM_EXTRA_CMD_ARGS -DWAS_HOME=$WAS_HOME -DWAS_INST=$WAS_INST -DWAS_PLUGIN_HOME=$WAS_PLUGIN_HOME -Djava.endorsed.dirs=${WAS_ENDORSED_DIRS_JDK8} "
- Save and close the file.
-
Open the following file in a text editor.
-
Update the wcnonroot script.
- Open the WC_installdir/bin/wcnonroot.sh script in a text editor.
-
Search and replace all occurrences of the WebSphere Application Server Version 7.0 installation
path with the WebSphere Application Server Version 8.5 installation path in the
WASDIR
section. -
Search and replace all instances of the old IBM HTTP Server installation path with the new IBM
HTTP Server installation path in the following fields.
- WEBDIR
- WEBCONFDIR
- WEBCONFILE
- Save the file.
-
Complete the following steps for each WebSphere Commerce instance that exists.
-
Open the
WC_installdir/instances/instance_name/httpconf/httpd.conf
file in a text editor and change the following lines.
- ServerRoot
- Replace the old IBM HTTP Server installation path with the new IBM HTTP Server installation path.
- was_ap22_module
- Replace the module path under the old plug-in file path with the one in new plug-in file path.
- For example, replace <plugin7_installdir>/bin/mod_was_ap22_http.so with <plugin85_installdir>/bin/64bits/mod_was_ap22_http.so
- WebSpherePluginConfig
- Replace the old plug-in file path with new plug-in file path.
-
Open the
WC_installdir/instances/instance_name/search/solr/home/httpconf/httpd.conf
file a text editor and change the following lines.
- ServerRoot
- Replace the old IBM HTTP Server installation path with the new IBM HTTP Server installation path.
- was_ap22_module
- Replace the module path under the old plug-in file path with the one in new plug-in file path.
- For example, replace <plugin7_installdir>/bin/mod_was_ap22_http.so with <plugin85_installdir>/bin/64bits/mod_was_ap22_http.so
- WebSpherePluginConfig
- Replace the old plug-in file path with new plug-in file path.
-
Open the
WC_installdir/instances/instance_name/properties/createInstance.properties
file and update the WebSphere Application Server information.
- WASInstallDir=WAS85_installdir
- WASUserInstallDir=WAS85_installdir
- WASProfileTemplatePath=WAS85_installdir/profileTemplates/default
- EARPath=WAS85_installdir/profiles/profile_name/installedApps/cell_name/WC_instance_name.ear
- WASProfilePath=WAS85_installdir/profiles/profile_name
- WASCellName=WAS85_CellName
- WASNodeName=WAS85_NodeName
- webserverInstallDir=IHS85_installdir
- webserverInstallLocation=IHS85_installdir
- pluginInstallLocation=plugin85_installdir
-
Open the
WC_installdir/instances/instance_name/httpconf/httpd.conf
file in a text editor and change the following lines.
-
Enable the Web Server plugin to accept SSL/TLS communications for both WebSphere Commerce web
server and Search web server.
- Log in to the WebSphere Application Server Version 8.5 Administrative Console.
- b. Click Servers > WebServer > web_server_name > > Plug-in properties > Custom properties.
- Click New to create a new custom property.
- Enter the value of UseInsecure for the Name field and true for the Value field.
- Click Save at the top of the page to save the changes to the master configuration.
-
Regenerate the Web server plug-in configuration file for the WebSphere Commerce server and
Search server.
- Click Servers > WebServer > web_server_name.
-
Click Generate Plug-in.
Keep the Administrative console open. You will come back to it.
- Ensure that the httpd.conf file is correctly updated with the correct location for the plugin-cfg.xml.
-
Update the WebSphere Commerce EAR.
- In a command line interface, go to WC_installdir/bin.
-
Run the following command to update the EAR.
-
./config_ant.sh -DinstanceName=instance_name UpdateEAR
-
./config_ant.bat -DinstanceName=instance_name UpdateEAR
-
-
Go back to the Administrative Console and update classload mode for the WC
application.
- Click Applications > Application Types > WebSphere enterprise applications > WC_application_name > Class loading.
- Update detection to access the settings page for an application class loader.
- Select Classes loaded with local class loader first (parent last) for Class loader order.
- Save your changes and ensure that the changes are synchronized with the master repository.
-
Add a custom JVM property
org.apache.el.parser.SKIP_IDENTIFIER_CHECK
with value "true" on the WebSphere Commerce server.- Click Servers > Server Types > WebSphere Application Servers > server_name > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties.
- Click New to create a custom property definition.
- Enter org.apache.el.parser.SKIP_IDENTIFIER_CHECK in the Name field.
- Enter true in the Value field.
- Click OK.
- Save your changes and ensure that the changes are synchronized with the master repository.
- Run the following command to update the
file permissions of our application.
- WC_installdir/bin/wcnonroot.sh
-
Update Search server properties.
- Open the WC_installdir/instances/instance_name /search/commerce/properties/searchServer.properties file.
- Replace the old searchWASProfilePath with the new searchWASProfilePath.
- Open the WC_installdir/bin/di-buildindex.sh file.
-
Search for the string "$MORE_CLASSPATH", and then insert one of the
following class paths before the string.
WC_eardir/lib/slf4j-api-1.6.1.jar:WC_eardir/lib/slf4j-jdk14-1.6.1.jar
Note: In Feature Pack 6, there is no variableEAR_PATH
definition. Specify your full EAR path; for example, /opt/WebSphere85/AppServer/profiles/demo/installedApps/WC_demo_cell/WC_demo.ear.$EAR_PATH/lib/commons-logging.jar:$EAR_PATH/lib/httpclient-4.3.1.jar:$EAR_PATH/lib/httpcore.jar:$EAR_PATH/lib/commons-codec.jar:$EAR_PATH/lib/slf4j-api.jar:$EAR_PATH/lib/slf4j-jdk.jar
Important: If you apply WebSphere Commerce maintenance after you upgrade to Java 8, it is possible that your di-buildindex.sh file will be overwritten. After you apply maintenance, ensure that your di-buildindex.sh file still contains the correct class path that you set during this step. If the class path is changed update the path to point to the correct class.
-
Install the following WebSphere Commerce fixes to enable your environment to support Java
8.
- Fix Pack 9 Cumulative Interim Fix 6 (JR59483.pf).
- Feature Pack 8 Cumulative Interim Fix 6 (JR59483.fep).
- JR60297.
- Restart the deployment manager, all cluster members, and the associated Web servers.
-
Verify that your environment is fully configured and working by completing a shopping flow in
your store.
If you encounter errors, review the following topic, Troubleshooting Developer environment issues after upgrading to Java 8.