Error:
“Caused by: java.lang.UnsupportedClassVersionError:
unsupported classversion 51.0”
Replication Of Issue:
When we try to deploy any service which
has been developed/Migrated on JDK which is higher than the JDK version used by
the server
Error Stack:
[04:04:30 PM]
[Deployer:149193]Operation 'deploy' on application 'ServiceName' has failed on
'Server1'
[04:04:30 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application 'ServiceName' on Server1.: Failed to load webapp: ''ServiceName'.war'.
[04:04:30 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: ''ServiceName'.war'
[04:04:30 PM] Caused by: java.lang.UnsupportedClassVersionError: <Package Name> : unsupported classversion 51.0
[04:04:30 PM] See server logs or server console for more details.
[04:04:30 PM] weblogic.application.ModuleException: Failed to load webapp: ''ServiceName'.war'
[04:04:30 PM] #### Deployment incomplete. ####
[04:04:30 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
[04:04:30 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application 'ServiceName' on Server1.: Failed to load webapp: ''ServiceName'.war'.
[04:04:30 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: ''ServiceName'.war'
[04:04:30 PM] Caused by: java.lang.UnsupportedClassVersionError: <Package Name> : unsupported classversion 51.0
[04:04:30 PM] See server logs or server console for more details.
[04:04:30 PM] weblogic.application.ModuleException: Failed to load webapp: ''ServiceName'.war'
[04:04:30 PM] #### Deployment incomplete. ####
[04:04:30 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
Resolution:
1)
1) Check the JDK
Requirement of the JDeveloper version which is to be installed. Eg. As per
Oracle documentation for Jdev 11.1.1.6.0 the JDK shall be JDK_6.0_27 or above.
2)
2) Check the server
jdk version.To do the same t go to location WL_HOME/common/bin/commEnv.cmd ad
Look for lines like the ones below (examples are from a WLS install on a Unix
machine)
#JAVA_USE_64BIT, true if JVM uses 64 bit operations.
#JAVA_USE_64BIT, true if JVM uses 64 bit operations.
3) 3) Install JDK version which is either server version or
lower than that version and then build/migrate your service.
Reference: To find the JDK
version of your server click here.
No comments:
Post a Comment