Switching the edition of Java used in IBM BPM

When you installed IBM® Business Process Manager (BPM), Java Technology Edition 6 was automatically installed along with the required version of WebSphere Application Server Network Deployment. However, you had the option of installing Java Technology Edition 7 by choosing the IBM WebSphere SDK Java Technology Edition install package, which was selected by default. You also had the option of installing Java Technology Edition 7.1 by choosing the IBM WebSphere SDK Java Technology Edition 7.1 install package, which was not selected by default. If you chose to install Java 7, it is used with IBM BPM instead of Java 6 or Java 7.1, but you can switch to Java 6 or Java 7.1 (if installed) and then later switch back to Java 7 by using the managesdk command.

IBM BPM does not support Java 8.

Before you begin

If you chose not to install Java 7 or 7.1 when you installed IBM BPM but you now want to use either Java 7 or 7.1, you must install it for each IBM BPM installation in your deployment environment before you can switch from Java 6. To install Java 7 or 7.1, locate the IBM Installation Manager JDK 7 or JDK 7.1 repository on the IBM BPM installation media that contains the base WebSphere Application Server repository, then use Installation Manager to install Java 7 or 7.1. (If Java 7 or 7.1 is not available for a specific operating system, the IBM BPM installation media for that operating system will not contain a JDK 7 or JDK 7.1 repository.)

Before you use the managesdk command to switch Java editions, you should read the WebSphere® Application Server topic managesdk command to ensure that you have met any preconditions for running the command.

About this task

IBM BPM does not support the use of different Java versions within the same cell. All deployment environments within a cell must use the same Java version. Existing profiles, new profiles, and commands should all use the same Java version.

Java snippets, Java conditions, and Java expressions in BPEL processes must use Java 6 constructs instead of Java 7 constructs.

Note: If you are using an Oracle database and you create a new deployment environment, all of the Oracle JDBC providers for the new deployment environment are automatically configured to use the correct Oracle JDBC driver for the edition of Java that was selected. However, if you switch the Java edition from Java 7 to Java 6 or Java 7.1 (or later switch back to Java 7 again), you will need to update the Oracle JDBC providers to use the correct Oracle JDBC driver (as described in the following procedure).

Procedure

To switch Java editions:

  1. Run the managesdk -listAvailable command to display a list of all SDK names in your environment, as described in the topic "managesdk command."
    install_root/bin/managesdk.sh -listAvailable
    
    CWSDK1003I: Available SDKs:
    CWSDK1005I: SDK name: 1.7.1_64
    CWSDK1005I: SDK name: 1.6_64 
    CWSDK1001I: Successfully performed the requested managesdk task.

    If the SDK version that you want is not installed, follow the instructions in the Installing and uninstalling SDK Java Technology Edition Version 7.0 or 7.1 topic to install the SDK package.

  2. If you want to switch the Java edition that is used for the command-line environment and all future profiles, run the following two commands:
    install_root/bin/managesdk.sh -setCommandDefault -sdkname sdk_name
    install_root/bin/managesdk.sh -setNewProfileDefault -sdkname sdk_name

    In the command syntax, replace the sdk_name variable with the edition of your Java installation, such as 1.6_64 for Java 6, or 1.7.1_64 for Java 7.1, or 1.7_64 for Java 7.

    After running these commands, any new profiles that you create will use the edition of Java that was specified with the commands.

  3. If you want to switch the Java edition that is used for existing profiles, complete the following steps:
    1. Stop your deployment manager, cluster members, and all node agents. Confirm that the deployment manager server has stopped.
    2. Switch the SDK version for the deployment manager profile by running the managesdk -enableProfile command as shown in the following example:
      install_root/bin/managesdk.sh -enableProfile -profileName DmgrProfile -sdk_name 1.7.1_64
  4. Switch the Java edition that is used for the node and cluster members. Repeat this step for each managed node of the deployment manager.
    1. Restart your deployment manager. For example, run the following command:
      install_root/bin/startManager.sh -profileName DmgrProfile
    2. Synchronize the managed node by running the syncNode command. The following snippet is an example of how to run the command:
      install_root/bin/syncNode.sh dmgrHostName.ibm.com 8879 -profileName Node1Profile -user AdminUser -password AdminPassword
      Use the deployment manager host name and SOAP port number for your environment.
    3. Run the managesdk -enableProfile command from the bin directory of the IBM BPM installation that hosts the managed node. The following snippet is an example of how to run the command:
      install_root/bin/managesdk.sh -enableProfile -profileName Node1Profile -sdkname 1.7.1_64 -user AdminUser -password AdminPassword -enableServers
  5. Validate the changes by running the managesdk -listEnabledProfileAll command as shown in the following example:
    install_root/bin/managesdk.sh -listEnabledProfileAll
    CWSDK1004I: Profile DmgrProfile :
    CWSDK1006I: PROFILE_COMMAND_SDK = 1.7.1_64
    CWSDK1008I: Node MyCellManager01 SDK name: 1.7.1_64
    CWSDK1009I: Server dmgr SDK name: 1.7.1_64
    
    CWSDK1004I: Profile Node1Profile :
    CWSDK1006I: PROFILE_COMMAND_SDK = 1.7.1_64
    CWSDK1008I: Node my-Node01 SDK name: 1.7.1_64
    CWSDK1009I: Server BPMDE.SingleCluster.Node01.0 SDK name: 1.7.1_64
    CWSDK1009I: Server nodeagent SDK name: 1.7.1_64
    CWSDK1001I: Successfully performed the requested managesdk task.
  6. If you have an Oracle database, complete the following steps to update the Oracle JDBC providers with the appropriate Oracle JDBC driver for the Java edition you switched to:
    1. Open the WebSphere administrative console.
    2. In the tree view, expand Resources > JDBC and then select JDBC providers. The JDBC Providers panel opens.
    3. In the JDBC Providers panel, click the link of the desired Oracle JDBC provider to open the editing panel.
    4. In the Class path text box, change the following class path for the Oracle JDBC driver to the appropriate JAR file for the Java edition that you switched to:
      ${ORACLE_JDBC_DRIVER_PATH}/jdbc_driver_jar

      The Oracle JDBC driver JAR files are in install_root/jdbcdrivers/Oracle. Specify the jdbc_driver_jar as listed:

      • With Oracle 11gR1, Java 6 is supported with the ojdbc6.jar JDBC driver.
      • With Oracle 11gR2, Java 6 and Java 7 are supported, both using the ojdbc6.jar JDBC driver.
      • With Oracle 12cR1, Java 6 is supported with the ojdbc6.jar driver, and Java 7 is supported with the ojdbc7.jar driver.
    5. Click Apply.
    6. Repeat the previous three steps for each of the remaining Oracle JDBC providers.
    7. When you have updated the last remaining Oracle JDBC provider, click Save to save the changes to the master configuration.
    8. Stop and restart your deployment manager.
  7. Start your nodes and deployment environment again (in that order).