(Developer) Configuring your existing development environment to use Java 8

You need to configure the following files to update an existing 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

Ensure that you completed the following tasks:
  1. (Developer) Installing Rational Application Developer Version 9.5.0.2 or a later 9.5 fix pack.
  2. (Developer) Installing WebSphere Application Server V8.5.5 with Java 8

Procedure

  1. Back up your current WebSphere Application Server profile.
    1. Create a temporary directory to store the back up files. This directory is called backup_dir in the remaining steps.
    2. Open a command line interface.
    3. Go to the WAS8_installdir/bin directory.
    4. Run the following command.
      WASPreUpgrade.cmd <backup_dir> <WAS7_installdir>
  2. Update configuration files and property files in the your WebSphere Commerce Developer workspace.
    1. Drop the existing WebSphere Application Server profile.
      1. Open the profileRegistry.xml file. For example,
        oldRAD_installdir\runtimes\base_v7\properties\profileRegistry.xml
      2. Copy the name value. For example, WCDE_E~1_072526
      3. Go to oldRAD_installdir/runtimes/base_v7/bin.
      4. Run the following command to delete the profile.
        manageprofiles.bat -delete -profileName <name>
    2. Delete the existing WCDE_installdir/wasprofile directory.
      The wasprofile directory will be recreated during the setup.bat command that you run later.
    3. Open the WCDE_installdir/bin/setenv.bat file.
    4. Update the following configurations.
      set RAD_HOME=<RAD9_installdir>
      set WAS_HOME=<WAS8_installdir>
      call setshortname WAS_HOME <WAS8_installdir>
      RAD9_installdir
      The directory where you installed Rational Application Developer Version 9.5.0.x. For example, C:\IBM\SDP95.
      WAS8_installdir
      The directory where you installed WebSphere Application Server Version 8.5.5.x. For example, C:\IBM\WebSphere\AppServer.
    5. Open the WCDE_installdir/setup/base.prefs file.
    6. Set the following configurations to 1.8.
      /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
      /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance=1.8
      /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source=1.8
      
    7. Open the WCDE_installdir/setup/setup.xml file.
    8. Change the name of the configureJRE task to WebSphere Application Server v8.0 JRE, as seen in the following example.
      <configureJRE id="commerce.jre"
             name="WebSphere Application Server v8.0 JRE"
             installLocation="${was_home}/java/jre"
             default="false"
          />
      
    9. Remove the existing createServer tasks from the configureServer target.
    10. Add the createWSRuntime and createWSServer tasks to the configureServer target, as seen in the following example.
      <target name="configureServer" unless="profileExists"> 
      <createWSRuntime typeId="com.ibm.ws.ast.st.runtime.v85" path="${was_home}" 
        name="WebSphere Commerce Runtime" /> 
      <createWSServer name="WebSphere Commerce Test Server" typeId="com.ibm.ws.ast.st.v85.server.base"
        runtimeId="com.ibm.ws.ast.st.runtime.v85"> 
      <property name="webSphereProfileName" value="${profile.name}" /> 
      <property name="isRunServerWithWorkspaceResources" value="true" /> 
      <property name="isZeroBinaryEnabled" value="true" /> 
      <property name="isOptimiziedForDevelopmentEnv" value="true" /> 
      <property name="isOptimiziedForDevelopmentEnv" value="true" /> 
      <property name="isHotMethodReplace" value="true" /> 
      <property name="isUTCEnabled" value="true" /> 
      <property name="auto-publish-setting" value="1" /> 
      <property name="serverOrbBootstrapPortNum" value="2809" /> 
      <property name="serverSoapConnectorPortNum" value="8880" /> 
      <property name="start-timeout" value="600" /> 
      </createWSServer>
      <deleteServer name="WebSphere Application Server v6.0" failonerror="false" /> 
      <deleteServer name="WebSphere Application Server v6.1" failonerror="false" /> 
      <deleteServer name="WebSphere Application Server v7.0 at localhost" failonerror="false" /> 
      </target>
    11. Remove the following two copy tasks.
      <copy file="${wctoolkit}/workspace/WC/xml/config/wc-server.xml.template"
                  tofile="${wctoolkit}/workspace/WC/xml/config/wc-server.xml"
                  filtering="true"
                  overwrite="yes"/>
          <copy file="${wctoolkit}/setup/ToolkitModuleConfig.xml.template"
                  tofile="${wctoolkit}/workspace/WC/xml/config/ToolkitModuleConfig.xml"
                  filtering="true"
                  overwrite="yes" />
      
    12. Remove setupCloudscape tasks.
      <!-- configure for cloudscape -->
      	<antcall target="setupCloudscape" />
      
    13. Move <!-- build the workspace --> task after the “configureServer” task.
      <!-- create a new server configuration -->
          <antcall target="configureServer" />
      <!-- build the workspace -->
          <ejbDeploy EJBProject="WebSphereCommerceServerExtensionsData" IgnoreErrors="true" Quiet="true" />
          <workspaceBuild BuildType="full" FailOnError="false" DebugCompilation="true" ShowErrors="false" />
      
  3. Update runtime name, java version, and websphere version in the workspace_dir/<projectname>/.setting/org.eclipse.wst.common.project.facet.core.xml file for each project that exists in your workspace.
    For example, in workspace_dir/CommerceAccelerator/.setting/org.eclipse.wst.common.project.facet.core.xml update the following code that is in bold.
    <faceted-project>
      <runtime name="com.ibm.ws.ast.st.runtime.v85"/>
      <fixed facet="jst.java"/>
      <fixed facet="jst.web"/>
      <installed facet="jst.java" version="1.8"/>
      <installed facet="jst.web" version="2.5"/>
      <installed facet="com.ibm.websphere.coexistence.web" version="8.5"/>
      <installed facet="com.ibm.websphere.extended.web" version="8.5"/>
      <installed facet="web.jstl" version="1.1"/>
      <installed facet="web.struts" version="1.2"/>
    </faceted-project>
    
  4. Update the JRE library and Server Library in Java Build Path (workspace_dir/<projectname>/.classpath) for each project.
    For example, in workspace_dir/CommerceAccelerator/.classpath update to the following code.
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server v8.0 JRE"/>
    	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v85/com.ibm.ws.ast.st.runtime.v85"/>
    
  5. Reconfigure WebSphere Commerce Developer to work with the new versions of Rational Application Developer, WebSphere Application Server, and IBM SDK Java.
    1. In a command line interface, go to WCDE_installdir/bin.
    2. Run the following command.
      setupPlugins.bat
    3. Then run the following command.
      setup.bat
      Ensure that the command finishes successfully.
  6. Start WebSphere Commerce Developer by running the following command.
    startWCToolkit.bat
  7. Verify that the WebSphere Application Server profile (wasprofile) was created.
    1. Open WAS_installdir/properties/pofileRegistry.xml.
      • Verify that the name value resembles the WebSphere Commerce Developer directory.
      • Verify that the path value includes the wasprofile directory.
      For example,
      <?xml version="1.0" encoding="UTF-8"?><profiles>
          <profile isAReservationTicket="false" isDefault="true" name="WCDE_E~1_152252" path="C:\IBM\WCDE_E~1\wasprofile" template="W:\IBM\WAS855\profileTemplates\default"/>
      </profiles>
    2. In WebSphere Commerce Developer, click Window > Preferences > Server > WebSphere Application Server Traditional.
    3. Verify that the new WebSphere Commerce Runtime is created and that the WebSphere Application Server profile is associated to the new Runtime.


  8. Restore the previous WebSphere Application Server profile configurations from the back up that you completed in step 1.
    1. Open a command line interface.
    2. Go to the WAS8_installdir/bin directory.
    3. Run the following command.
      WASPostUpgrade.bat <backup_dir> -oldProfile <profile_name> -profileName <WAS85_profile_name>
  9. Feature Pack 7 or later Add the search project into the Test server and publish the application.
    1. In the Servers view, right-click WebSphere Commerce Test server and select Add and remove.
    2. Select search from the left menu (Available).
    3. Click Add to move search to the right menu (Configured).
    4. Click Finish.
    5. Right click the WebSphere Commerce Test server and select Publish.
  10. Add and set a custom JVM property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true on the WebSphere Application Server JVM that will relax the variable identifier checks.
    1. Right click the WebSphere Commerce Test server and select Administration > Run Administrative Console.
    2. Go to Servers > Server Types > WebSphere Application Servers > server_name > Java and Process Management > Process Definition > Java Virtual Machine > Custom properties.
    3. Click New to create a custom property.
    4. Enter org.apache.el.parser.SKIP_IDENTIFIER_CHECK in the Name field.
    5. Enter true in the Value field.
    6. Click OK.
    7. Repeat the steps to add two custom JVM properties for the search application.
      Name Value
      solr.allow.unsafe.resourceloading true
      solr.solr.home <Path to solr\home>

      For example,

      C:\IBM\WCDE_ENT70\search\solr\home
  11. Feature Pack 7 or later Delete the file xercesImpl.jar under workspace_dir/search/lib.
  12. Update classloader mode to “PARENT_LAST” for both WC project and search project.
    1. Open workspace_dir\WC\META-INF\ibmconfig\cells\defaultCell\applications\defaultApp\deployments\defaultApp\deployment.xml.
    2. Set the mode to PARENT_LAST.
      For example,
      <classloader mode="PARENT_LAST" xmi:id="Classloader_1171840684437"/>
    3. Feature Pack 7 or later Open workspace_dir\Search\META-INF\ibmconfig\cells\defaultCell\applications\defaultApp\deployments\defaultApp\deployment.xml.
    4. Feature Pack 7 or later Set the mode to PARENT_LAST.
      For example,
      <classloader mode="PARENT_LAST" xmi:id="Classloader_1371574097936"/>
  13. Open the following two files.
    • WCDE_installdir/properties/version/update/config/commerceear/updateStoreArchives.xml
    • WCDE_installdir/properties/version/update/config/toolkit.native.commerce.base\updateStoreArchives.xml
  14. Search for {RAD_HOME}/runtimes/base_v7 and replace with the explicit path to the new WAS8_installdir.
    For example, change
    <condition property="WAS_HOME" value="${RAD_HOME}/runtimes/base_v7"> 
    
    To
    <condition property="WAS_HOME" value="C:\IBM\WAS855">
    Note: You can also change the value to use the variable, ${WAS_HOME} instead of specifying the full path (C:\IBM\WAS855). But if you use the ${WAS_HOME} variable, then you need to also search and remove all instances of the string <striplinebreaks/>.
  15. Install the following WebSphere Commerce fixes to enable your environment to support Java 8.
    • IFJR60297
    • Feature Pack 6 or laterJR59276
      Note: If you are on Fix Pack 7, there is a dependency between JR59276 and JR48723. After applying JR59276 on Fix Pack 7, you must enable the JR48723 fix. For more information, see Enabling interim fix JR48723.
    • Feature Pack 8JR59294
    For information about how to install the fixes, see Installing WebSphere Commerce Developer interim fixes.
  16. Republish the WC and search application, and then restart the WebSphere Commerce Test server.
  17. Verify that your environment is fully configured and working by completing a shopping flow in your store.