(Runtime) Configuring your existing standalone runtime environment to use Java 8
You need to configure the following files to update an existing WebSphere Commerce runtime environment to use IBM SDK, Java Technology Edition, Version 8.
Before you begin
Procedure
- Stop all WebSphere Commerce servers.
-
Create a new WebSphere Application Server Version 8.5.5 profile for each existing WebSphere
Commerce Server and Search Server that you want to migrate.
- Go to the WAS85_installdir/bin directory.
-
Run the following command to create a profile. The new profile must have the same profile name,
cell name, and node name as the WebSphere Commerce Version 7.0 instance.
For example,
./manageprofiles.sh -create -profileName demo -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default -nodeName WC_demo -cellName WC_demo_cell -hostName hostname.domain
-
Migrate your existing WebSphere Commerce instances. Repeat these steps for each WebSphere
Commerce and WebSphere Search server that you are migrating.
-
Ensure that you are logged in as a user with the appropriate privileges.
- Ensure that you are logged in as the root user. If you are already
signed onto the system, issue the command
su - root
. - Ensure that you are logged in with a user ID that is a member of the Windows Administration group.
- Ensure that you are logged in as the root user. If you are already
signed onto the system, issue the command
- Create a temporary directory that will be used for backing up your files. This directory is called backup_dir in the remaining sections.
-
Run the following command from the WAS85_installdir/bin
directory.
-
./WASPreUpgrade.sh backup_dir WAS7_installdir
-
WASPreUpgrade.cmd backup_dir WAS7_installdir
-
- Start your WebSphere Application Server Version 8.5 server.
-
Run the following command for each profile that you are migrating.
-
WASPostUpgrade.sh backup_dir -oldProfile profile_name -profileName WAS85_profile_name
-
WASPostUpgrade.bat backup_dir -oldProfile profile_name -profileName WAS85_profile_name
Note: The profile_name and WAS85_profile_name have the same name. -
-
Review the following log files for errors or warnings.
WAS85_installdir/profiles/profile_name/logs/WASPostUpgrade.date_time.log
-
Update the ownership of each WebSphere Application Server profile that you migrated by running
the following command.
chown -R WC_non-root_user WAS85_installdir/profiles/profile_name
-
Ensure that you are logged in as a user with the appropriate privileges.
-
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 config_ant utility script.
- Open the WC_installdir/bin/config_ant.bat file for editing.
-
Add the
WAS_ENDORSED_DIRS_JDK8
variable.SET WAS_ENDORSED_DIRS_JDK8=%WAS_HOME%/endorsed_apis;%WAS_HOME%/runtimes/endorsed {{}}
-
Add the
-Djava.endorsed.dirs path to
the
JAVA_HOME
path."%JAVA_HOME%\bin\java" -Djava.endorsed.dirs=%WAS_ENDORSED_DIRS_JDK8% -Djava.util.logging.config.file="%WCS_HOME%\config\deployment\properties\config_ant.properties" -DWAS_PLUGIN_HOME="%WAS_PLUGIN_HOME%" -DWAS_HOME="%WAS_HOME%" -DWAS_INST="%WAS_HOME%" -Dwas.ant.extra.classpath="%WAS_ANT_EXTRA_CLASSPATH%" -Dwas.install.root="%WAS_HOME%" -Duser.install.root="%WAS_HOME%" -Dwas.root="%WAS_HOME%" -Dws.ext.dirs="%WAS_EXT_DIRS%" com.ibm.ws.bootstrap.WSLauncher com.ibm.commerce.config.ant.server.AntLauncher -logger com.ibm.commerce.config.internal.ant.loggers.AntLogger %WCCONFIG_XML_LOGGER_OPTIONS% %*if %ERRORLEVEL% NEQ 0 set configFailed=true{{}}{{}}
- Save and close the file.
-
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 WebSphere Commerce server, Search server 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.