RESTEasy java.lang.LinkageError:定义类时的LinkageError:org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

时间:2011-10-13 17:05:55

标签: web-services resteasy websphere-6.1

我正在尝试在我的项目中实现RESTEasy,即提供

  

java.lang.LinkageError:定义时的LinkageError   类:org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

我正在使用websphere 6.1和RESTEasy 2.1.0.GA

详细错误如下:

  

`引起:java.lang.LinkageError:定义类时的LinkageError:org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher   由于以下原因无法定义:(org / jboss / resteasy / plugins / server / servlet / HttpServletDispatcher)偏差= 6的主要版本   这通常是由多个类定义的   类加载器层次结构中的位置。其他潜在原因   包括针对该类的较旧版本或较新版本进行编译   具有不兼容的方法签名。   转储当前上下文类加载器层次结构:       ==>表示定义类加载器   ==> [0]   com.ibm.ws.classloader.CompoundClassLoader@46204620      本地ClassPath:      委派模式:PARENT_FIRST      [1]   com.ibm.ws.classloader.CompoundClassLoader@20ac20ac      本地ClassPath:      委派模式: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   ---原件异常---   java.lang.UnsupportedClassVersionError :( org / jboss / resteasy / plugins / server / servlet / HttpServletDispatcher)偏差= 6的坏主要版本       at java.lang.ClassLoader.defineClassImpl(Native Method)       at java.lang.ClassLoader.defineClass(ClassLoader.java:258)       在java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)       在com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:555)       在com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:506)       在com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:380)       at java.lang.ClassLoader.loadClass(ClassLoader.java:597)       在java.beans.Beans.instantiate(Beans.java:202)       在java.beans.Beans.instantiate(Beans.java:63)       在com.ibm.ws.webcontainer.servlet.ServletWrapper $ 1.run(ServletWrapper.java:1334)       在com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)       在com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1329)       在com.ibm.ws.wswebcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:388)       在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:410)       在com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)       在com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440)       在com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)       在com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)       在com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)       在com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)       在com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)       在com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)       在com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)       at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)       在com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)       at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)       在com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)       在com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)       在com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)       在com.ibm.io.async.ResultHandler $ 2.run(ResultHandler.java:873)       在com.ibm.ws.util.ThreadPool $ Worker.run(ThreadPool.java:1473)

---结束原始异常----

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

`

1 个答案:

答案 0 :(得分:2)

您尝试使用的库是使用Java 1.6编译的。 WebSphere Application Server 6.1仅支持1.5。