1

I am getting java.lang.UnsupportedClassVersionError: error while trying to deploy and start my war in WAS 8.5 server. I went through several issue which says it is due to version conflict of compiled jdk(1.7) and the running jre. But in my case both of them are same i.e 1.7 only.

Please help me out with below details.

System details

**************************
Java version = 1.7.0, Java Runtime Version = pxa6470_27sr3fp10-20150708_01 (SR3 FP10), Java Compiler = j9jit27, Java VM name = IBM J9 VM
was.install.root = /opt/IBM/WebSphere85/AppServer
user.install.root = /opt/IBM/WebSphere85/AppServer/profiles/appprofile
Java Home = /opt/IBM/WebSphere85/AppServer/java_1.7.1_64/jre
ws.ext.dirs = /opt/IBM/WebSphere85/AppServer/java_1.7.1_64/lib:/opt/IBM/WebSphere85/AppServer/profiles/appprofile/classes:/opt/IBM/WebSphere85/AppServer/classes:/opt/IBM/WebSphere85/AppServer/lib:/opt/IBM/WebSphere85/AppServer/installedChannels:/opt/IBM/WebSphere85/AppServer/lib/ext:/opt/IBM/WebSphere85/AppServer/web/help:/opt/IBM/WebSphere85/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = /opt/IBM/WebSphere85/AppServer/profiles/appprofile/properties:/opt/IBM/WebSphere85/AppServer/properties:/opt/IBM/WebSphere85/AppServer/lib/startup.jar:/opt/IBM/WebSphere85/AppServer/lib/bootstrap.jar:/opt/IBM/WebSphere85/AppServer/lib/jsf-nls.jar:/opt/IBM/WebSphere85/AppServer/lib/lmproxy.jar:/opt/IBM/WebSphere85/AppServer/lib/urlprotocols.jar:/opt/IBM/WebSphere85/AppServer/deploytool/itp/batchboot.jar:/opt/IBM/WebSphere85/AppServer/deploytool/itp/batch2.jar:/opt/IBM/WebSphere85/AppServer/java_1.7.1_64/lib/tools.jar
Java Library path = /opt/IBM/WebSphere85/AppServer/lib/native/linux/x86_64/:/opt/IBM/WebSphere85/AppServer/java_1.7.1_64/jre/lib/amd64/compressedrefs:/opt/IBM/WebSphere85/AppServer/java_1.7.1_64/jre/lib/amd64:/opt/IBM/WebSphere85/AppServer/bin:/opt/oraapp/instantclient/12.1.0.2_x64_DBAocl024:/usr/lib:
Orb Version = IBM Java ORB build orb727-20150520.00

I have compiled my code in jdk version java_1.7.1_64 only.But still I am getting the below error.

[7/12/16 5:54:51:044 GMT] 000026a1 SystemOut     O 2016-07-12 05:54:51,044 INFO  [WebContainer : 11] HibernateEntityDao - (bd0cd905-34ed-496e-aa59-d9af0809c6fa) - Dml.Entity.RootName: 5 msecs;
[7/12/16 5:54:51:172 GMT] 000026a1 SystemOut     O Outgoing message: EntityLifeCycleServiceV2_0 - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:entityDrmWrapper xmlns:ns2="http://clientcentral.hex.com/ns/webservice/2.0/"><entity xsi:type="ns4:Organisation" xmlns:ns4="http://clientcentral.hex.com/ns/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><grid>10272014</grid><versionNo>1</versionNo><lockKey>2</lockKey><strategicClient>false</strategicClient><countryOfDomicile>MX</countryOfDomicile><entityStatus>ACT</entityStatus><dataVerificationStatus>PAV</dataVerificationStatus><freeFormAddresses><postChannelType>MAIN_ADDRESS</postChannelType><addressLine1>452 FIFTH AVENUE</addressLine1><city>Guadalajara</city><country>MX</country><immutableId>11239185</immutableId></freeFormAddresses><alternateNames><alternateNameType>SHT</alternateNameType><alternateName>708653247371</alternateName><immutableId>1205582</immutableId></alternateNames><approvalStatus>APR</approvalStatus><hkmaLicensedBankFlag>false</hkmaLicensedBankFlag><immutableId>11261064</immutableId><entityLOBs><lineOfBusiness>GBM</lineOfBusiness><lineBusinessRelationshipType>INT</lineBusinessRelationshipType><startDate>2016-07-12</startDate></entityLOBs><legalName>1442648455386</legalName><hexAffiliate>false</hexAffiliate><countryOfHeadOffice>MX</countryOfHeadOffice><countryOfRegistration>MX</countryOfRegistration><countryOfPrimaryOperation>MX</countryOfPrimaryOperation><sics><percentage>100</percentage><code>0111</code><type>1</type><immutableId>11202791</immutableId></sics><dateOfIncorporation>2013-10-04</dateOfIncorporation><organisationFormationType>I</organisationFormationType><organisationSubType>BDS</organisationSubType><industryClassifications><percentage>100</percentage><code>0111</code><type>1</type><scheme>1</scheme><immutableId>11228030</immutableId></industryClassifications></entity></ns2:entityDrmWrapper></soapenv:Body></soapenv:Envelope>
[7/12/16 5:56:01:193 GMT] 00001373 AdminHelper   A   ADMN1008I: An attempt is made to start the mrds-web_war_vib_12072016 application. (User ID = glue.systems.uk.hex:3269/HBEU-mrds)
[7/12/16 5:56:01:221 GMT] 00001373 CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=mrds-web_war_vib_12072016 in BLA WebSphere:blaname=mrds-web_war_vib_12072016.
[7/12/16 5:56:05:407 GMT] 00001373 ApplicationMg A   WSVR0200I: Starting application: mrds-web_war_vib_12072016
[7/12/16 5:56:05:408 GMT] 00001373 ApplicationMg A   WSVR0204I: Application: mrds-web_war_vib_12072016  Application build level: Unknown
[7/12/16 5:56:05:636 GMT] 00001373 webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: mrds-web.
[7/12/16 5:56:05:658 GMT] 00001373 annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper collectClasses unable to instantiate class
                                 java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/hex/client/ws/endpoint/v2_0/impl/EntityBulkServiceV2_0Endpoint, offset=6
    at java.lang.ClassLoader.defineClassImpl(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:286)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
    at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:778)
    at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:691)
    at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:514)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:642)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Class.java:273)
    at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.loadClass(WASAnnotationHelper.java:795)
    at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.collectClasses(WASAnnotationHelper.java:589)
    at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.<init>(WASAnnotationHelper.java:145)
    at com.ibm.ws.webcontainer.annotation.WASAnnotationHelperManager.getAnnotationHelper(WASAnnotationHelperManager.java:59)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:247)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:732)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:617)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1146)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1320)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:945)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:759)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1291)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5398)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5486)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1296)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2076)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:434)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:377)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:648)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:610)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1203)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:69)
    at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:272)
    at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1152)
    at java.security.AccessController.doPrivileged(AccessController.java:309)
    at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
    at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1146)
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:999)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:847)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:783)
    at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1346)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1239)
    at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
    at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:242)
    at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:353)
    at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:595)
    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
vibhas
  • 1,449
  • 4
  • 18
  • 32
  • There is a quirk with Eclipse mentioned at [this answer](http://stackoverflow.com/a/2467356/6216002).See if it works for you. Side note: searching for `UnsupportedClassVersionError` on SO returns 161 results, so this question is highly likely to be a duplicate. – Haxiel Jul 12 '16 at 10:33
  • What does /usr/bin/file say about the particular class in the error message? or head -c8 the-class |hexdump? – covener Jul 12 '16 at 22:50

0 Answers0