(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.

Important: If you need to continue to receive support for WebSphere Application Server, you must upgrade to WebSphere Application Server to version 8.5.5 with Java 8. Earlier versions of WebSphere Application Server are no longer supported. You can only update to use IBM SDK, Java Technology Edition Version 8 if your existing WebSphere Commerce runtime instance is on WebSphere Commerce version 7 Feature Pack 6, 7, or 8, and has Fix Pack 9 installed. For information about updating to Feature Pack 8, see Installing WebSphere Commerce feature packs.

Before you begin

  1. Install WebSphere Application Server V8.5.5 with Java 8
  2. Migrate from your previous version of the IBM HTTP Server.
Your WebSphere Commerce instance must be on WebSphere Commerce version 6, 7, or 8, and have Fix Pack 9 installed to upgrade to WebSphere Application Server V8.5.5

Procedure

  1. Stop all WebSphere Commerce servers.
  2. 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.
    1. Go to the WAS85_installdir/bin directory.
    2. 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
  3. Migrate your existing WebSphere Commerce instances. Repeat these steps for each WebSphere Commerce and WebSphere Search server that you are migrating.
    1. Ensure that you are logged in as a user with the appropriate privileges.
      • SolarisLinuxAIXEnsure that you are logged in as the root user. If you are already signed onto the system, issue the command su - root.
      • WindowsEnsure that you are logged in with a user ID that is a member of the Windows Administration group.
    2. Create a temporary directory that will be used for backing up your files. This directory is called backup_dir in the remaining sections.
    3. Run the following command from the WAS85_installdir/bin directory.
      • SolarisLinuxAIX
        ./WASPreUpgrade.sh backup_dir WAS7_installdir
      • Windows
        WASPreUpgrade.cmd backup_dir WAS7_installdir
      Where WAS7_installdir is the full path to your WebSphere Application Server Version 7 installation directory.
    4. Start your WebSphere Application Server Version 8.5 server.
    5. Run the following command for each profile that you are migrating.
      • SolarisLinuxAIX
        WASPostUpgrade.sh backup_dir -oldProfile profile_name -profileName WAS85_profile_name
      • Windows
        WASPostUpgrade.bat backup_dir -oldProfile profile_name -profileName WAS85_profile_name
      Note: The profile_name and WAS85_profile_name have the same name.
    6. Review the following log files for errors or warnings.

      WAS85_installdir/profiles/profile_name/logs/WASPostUpgrade.date_time.log

    7. SolarisLinuxAIX 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
  4. For each existing WebSphere Commerce instance, complete the following steps.
    1. Open the following file.
      WC_installdir/instances/instance_name/xml/instance_name.xml
    2. 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 with
      WAS85_installdir/profiles/profile_name/installedApps/WAS85_CellName/WC_instance_name.ear
    3. Save the changes.
  5. Complete the following steps for the WebSphere Commerce product.
    1. Open WC_installdir/xml/product.xml in a text editor.
    2. 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.
    3. Search and replace all instances of the old IBM HTTP Server V7 installation path with the new IBM HTTP Server V8.5 installation path.
    4. Save the file.
  6. Update the setenv utility script.
    1. Open the following file in a text editor.
      • SolarisAIXWC_installdir/bin/setenv.sh
      • WindowsWC_installdir/bin/setenv.bat
    2. 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
    3. SolarisLinuxAIX Search for export WAS_HOME, then add the following lines of code after export 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
    4. SolarisLinuxAIX Add the following WAS_ENDORSED_DIRS_JDK8 variable.
      WAS_ENDORSED_DIRS_JDK8=$WAS_HOME/endorsed_apis:$WAS_HOME/runtimes/endorsed
    5. SolarisLinuxAIX 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} "

    6. Save and close the file.
  7. Windows Update the config_ant utility script.
    1. Open the WC_installdir/bin/config_ant.bat file for editing.
    2. Add the WAS_ENDORSED_DIRS_JDK8 variable.
      SET WAS_ENDORSED_DIRS_JDK8=%WAS_HOME%/endorsed_apis;%WAS_HOME%/runtimes/endorsed
      {{}}
    3. 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{{}}{{}}
    4. Save and close the file.
  8. SolarisLinuxAIX Update the wcnonroot script.
    1. Open the WC_installdir/bin/wcnonroot.sh script in a text editor.
    2. 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.
    3. 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
    4. Save the file.
  9. Complete the following steps for each WebSphere Commerce instance that exists.
    1. 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.
      Ensure that the httpd.conf file contains the correct locations to any other WC_instance_name.ear files that you might have previously configured.
    2. 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.
      Ensure that the httpd.conf file contains the correct locations to any other WC_instance_name.ear files that you might have previously configured.
    3. 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
  10. Enable the Web Server plugin to accept SSL/TLS communications for both WebSphere Commerce web server and Search web server.
    1. Log in to the WebSphere Application Server Version 8.5 Administrative Console.
    2. b. Click Servers > WebServer > web_server_name > > Plug-in properties > Custom properties.
    3. Click New to create a new custom property.
    4. Enter the value of UseInsecure for the Name field and true for the Value field.
    5. Click Save at the top of the page to save the changes to the master configuration.
  11. Regenerate the Web server plug-in configuration file for the WebSphere Commerce server and Search server.
    1. Click Servers > WebServer > web_server_name.
    2. Click Generate Plug-in.

      Keep the Administrative console open. You will come back to it.

  12. Ensure that the httpd.conf file is correctly updated with the correct location for the plugin-cfg.xml.
  13. Update the WebSphere Commerce EAR.
    1. In a command line interface, go to WC_installdir/bin.
    2. Run the following command to update the EAR.
      • SolarisLinuxAIX
        ./config_ant.sh -DinstanceName=instance_name UpdateEAR
      • Windows
        ./config_ant.bat -DinstanceName=instance_name UpdateEAR
  14. Go back to the Administrative Console and update classload mode for the WC application.
    1. Click Applications > Application Types > WebSphere enterprise applications > WC_application_name > Class loading.
    2. Update detection to access the settings page for an application class loader.
    3. Select Classes loaded with local class loader first (parent last) for Class loader order.
    4. Save your changes and ensure that the changes are synchronized with the master repository.
  15. Add a custom JVM property org.apache.el.parser.SKIP_IDENTIFIER_CHECK with value "true" on the WebSphere Commerce server.
    1. Click Servers > Server Types > WebSphere Application Servers > server_name > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties.
    2. Click New to create a custom property definition.
    3. Enter org.apache.el.parser.SKIP_IDENTIFIER_CHECK in the Name field.
    4. Enter true in the Value field.
    5. Click OK.
    6. Save your changes and ensure that the changes are synchronized with the master repository.
  16. SolarisLinuxAIXRun the following command to update the file permissions of our application.
    • WC_installdir/bin/wcnonroot.sh
  17. Update Search server properties.
    1. Feature Pack 7 or later Open the WC_installdir/instances/instance_name /search/commerce/properties/searchServer.properties file.
    2. Feature Pack 7 or later Replace the old searchWASProfilePath with the new searchWASProfilePath.
    3. Open the WC_installdir/bin/di-buildindex.sh file.
    4. Search for the string "$MORE_CLASSPATH", and then insert one of the following class paths before the string.
      • Feature Pack 6WC_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 variable EAR_PATH definition. Specify your full EAR path; for example, /opt/WebSphere85/AppServer/profiles/demo/installedApps/WC_demo_cell/WC_demo.ear.
      • Feature Pack 8Feature Pack 7 $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.
  18. Install the following WebSphere Commerce fixes to enable your environment to support Java 8.
    For information about how to install the fixes, see Installing WebSphere Commerce interim fixes.
  19. Restart the WebSphere Commerce server, Search server and the associated Web servers.
  20. 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.