Sunday 12 February 2017

java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/rules/res/xu/spi/internal/XUResourceAdapter

Not sure why I've not seen this before, but that's a problem for another day.

During a build of an IBM Operational Decision Manager (ODM) 8.8.1 environment, I saw this: -

...
  [wsadmin] GBRPT0017I: Install resource adapter on the node: Node1 
  [wsadmin] WASX7017E: Exception received while running file "/opt/ibm/WebSphereProfiles/Dmgr01/bin/rules/configureDSRulesNetworkDeployer.py"; exception information: com.ibm.websphere.management.exception.ConfigServiceException
  [wsadmin] javax.management.MBeanException
  [wsadmin] com.ibm.websphere.management.exception.AdminException
  [wsadmin] java.lang.UnsupportedClassVersionError: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/rules/res/xu/spi/internal/XUResourceAdapter, offset=6

  [wsadmin] Java Result: 105

BUILD SUCCESSFUL
Total time: 2 minutes 14 seconds

...

during the build of the Rule Execution Server (RES) cluster.

This is what I had installed: -

/opt/ibm/InstallationManager/eclipse/tools/imcl listAvailablePackages -repositories /mnt/disk1/WAS,/mnt/disk1/WASJDK7,/mnt/disk2/DecisionServerRules,/mnt/disk2/ProfileTemplateRules

com.ibm.websphere.ND.v85_8.5.5009.20160225_0435
com.ibm.websphere.IBMJAVA.v70_7.0.9030.20160224_1826
com.ibm.websphere.odm.ds.rules.v88_8.8.1000.20160527_0819
com.ibm.websphere.odm.pt.rules.v88_8.8.1000.20160527_0949


and this is how I was creating the cluster: -

export ODM_HOME=/opt/ibm/ODM881/
/opt/ibm/WebSphereProfiles/Dmgr01/bin/configureDSCluster.sh -dmgrAdminUsername wasadmin -dmgrAdminPassword passw0rd -clusterPropertiesFile ~/configureDSCluster.properties -targetNodeName Node1 -dmgrHostName `hostname` -dmgrPort 8879


Thankfully, the internet had the solution: -

which said, in part: -

<snip>
The problem occured because profiles are created by default with Java 6 and ODM 8.8 components require Java 7.

To make sure that WAS profiles are created by default with a given version use the managesdk command.

To check the default WAS profile Java version execute:

WAS_HOME/bin/managesdk -getNewProfileDefault

To set the default Java version to 1.7_4 execute:

WAS_HOME/bin/managesdk -setNewProfileDefault -sdkName 1.7_64

</snip>

Once I realised this, I added the following steps to my build: -

Check Default SDK

/opt/ibm/WebSphere/AppServer/bin/managesdk.sh -getNewProfileDefault

CWSDK1007I: New profile creation SDK name: 1.6_64
CWSDK1001I: Successfully performed the requested managesdk task.


Set SDK to 1.7

/opt/ibm/WebSphere/AppServer/bin/managesdk.sh -setNewProfileDefault -sdkName 1.7_64

CWSDK1022I: New profile creation will now use SDK name 1.7_64.
CWSDK1001I: Successfully performed the requested managesdk task.


Check Default SDK

/opt/ibm/WebSphere/AppServer/bin/managesdk.sh -getNewProfileDefault

CWSDK1007I: New profile creation SDK name: 1.7_64
CWSDK1001I: Successfully performed the requested managesdk task.


Once done, my cluster magically created : -

...
  [wsadmin] GBRPT0019I: Start application jrules-ssp on server Node1-DSServer ...
  [wsadmin] GBRPT0019I: Start application jrules-res-management on server RulesMgrSrv ...
  [wsadmin] GBRPC0005I: Invoking synchronization for node Node1 ...
  [wsadmin] GBRPC0013I: Synchronization done.
  [wsadmin] GBRPC0028I: The cluster is up and running!

BUILD SUCCESSFUL
Total time: 5 minutes 24 seconds

...


No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...