I am trying to implement RESTEasy in my project, which is giving
java.lang.LinkageError: LinkageError while defining class:org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
I am using websphere 6.1 and RESTEasy 2.1.0.GA
The detail error is as follows:
`Caused by: java.lang.LinkageError: LinkageError while defining class: org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher Could not be defined due to: (org/jboss/resteasy/plugins/server/servlet/HttpServletDispatcher) bad major version at offset=6 This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] com.ibm.ws.classloader.CompoundClassLoader@46204620 Local ClassPath: Delegation Mode: PARENT_FIRST [1] com.ibm.ws.classloader.CompoundClassLoader@20ac20ac Local ClassPath: Delegation Mode: PARENT_FIRST [2] com.ibm.ws.classloader.ProtectionClassLoader@49de49de [3] com.ibm.ws.bootstrap.ExtClassLoader@7b127b12 [4] org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@2db22db2 [5] sun.misc.Launcher$AppClassLoader@62e662e6 [6] sun.misc.Launcher$ExtClassLoader@7fee7fee ---Original exception--- java.lang.UnsupportedClassVersionError: (org/jboss/resteasy/plugins/server/servlet/HttpServletDispatcher) bad major version at offset=6 at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:258) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:555) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:506) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:380) at jav开发者_运维问答a.lang.ClassLoader.loadClass(ClassLoader.java:597) at java.beans.Beans.instantiate(Beans.java:202) at java.beans.Beans.instantiate(Beans.java:63) at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1334) at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1329) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:388) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:410) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 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:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
--- end Original exception----
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:602)
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:506)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
at java.beans.Beans.instantiate(Beans.java:202)
at java.beans.Beans.instantiate(Beans.java:63)
at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1334)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1329)
... 19 more
`
The library you are attempting to use was compiled using Java 1.6. WebSphere Application Server 6.1 supports only 1.5.
精彩评论