0

Websphere 8.5.0.2 has java 1.7u67. So I am building my application with Java 1.7u60. But still Websphere complains while deploying that, Incompatible version and application might have compiled in higher version that the server is configured for.

I donot have any other version of Java in my local system other than 1.7u60. Not sure why this error is thrown. Could this be some websphere issue? Or is there something i am missing while building my application? PS: Its an .ear file that I am trying to deploy in WAS 8.5

EDIT:

The error thrown by WebSphere is -

ADMA5006E: An error occurred configuring FIN-RA in WebSphere Application Server repository: com.ibm.websphere.management.exception.AdminException: ADMN0068E: An exception occurred while loading resource adapter class com.fin.ps.ra.RaResourceAdapter. The class might have been compiled with a newer version of Java than the application server is using. The exception was: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/fin/ps/ra/RaResourceAdapter, offset=6

Java Version In WebSphere:

java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

EDIT2:

Command managesdk -enableProfileAll -sdkname 1.7_64 -enableServers, did not work and was throwing 'profile cannot be enabled'. So i ran the following command.

managesdk -enableProfile -profileName FMprofile2 -sdkName 1.7_64. This worked fine.

When i run managesdk -listEnabledProfile -profileName FMprofile2. The result is,

CWSDK1004I: Profile FMprofile2 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.7_64
CWSDK1008I: Node FMNode02 SDK name: 1.7_64
CWSDK1009I: Server FDIND SDK name: 1.7_64
CWSDK1009I: Server nodeagent SDK name: 1.7_64
CWSDK1009I: Server FMmember2 SDK name: 1.6_64

Two questions here:
1) Why there is a server with 1.6_64 even after enabling the whole profile?
2) Any way I was working on Server FDIND, which is enabled to 1.7_64. So i tried redeploying my application, but ended up with same error. What could be the cause?

PS: also ran command syncNode and restarted the node.

naamadheya
  • 1,902
  • 5
  • 21
  • 28

2 Answers2

1

WebSphere 8.5.x by default comes with Java v6, even if you installed additional Java v7 you have to enable it for the given profile using managesdk command.

Ensure that your profile is enabled:

managesdk -listEnabledProfileAll -verbose

and if not enabled - enable using:

managesdk -enableProfileAll -sdkname yourV7SdkName -enableServers

To find sdkname issue:

managesdk -listAvailable -verbose
Gas
  • 17,601
  • 4
  • 46
  • 93
0

The problem is the IBM provides their own JRE with WAS. I would suggest to use IBM JDK/JRE.

Use the following link to verify JRE version.

Anton N
  • 2,317
  • 24
  • 28
  • But there was no problem when I was compiling my code with Java 1.6. This problem occurs when i use Java 1.7. So I am wondering, that WAS 8.5 really has Java 1.7u67 or something else? – naamadheya Jul 14 '15 at 05:55
  • Basically you has compiled your project with unsupported/incapable jvm. See more explanation : http://stackoverflow.com/questions/14926402/unsupportedclassversionerror-jvmcfre003-bad-major-version-in-websphere-as-7 – Anton N Jul 14 '15 at 11:41