2 Replies Latest reply on Mar 3, 2014 9:38 AM by Ocean Yang

    Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.LinkageError

    Matti Linnanvuori Newbie

      I got an error when I ran an EAR that has StatusElement.class in both a JAR and a WAR.

      I added a new interface and a method to a Resteasy servlet and I got the following error when I posted a request to that interface.

      I am running JBossAS [6.1.0.Final "Neo"]

      Java is jdk64/jdk1.6.0_29

      Resteasy is provided by the following JARs:

      ./server/default/deployers/resteasy.deployer

      ./server/default/deployers/resteasy.deployer/resteasy-jaxb-provider-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/resteasy-jettison-provider-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/resteasy-jaxrs-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/resteasy-cdi-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/META-INF/resteasy-ejb-jboss-beans.xml

      ./server/default/deployers/resteasy.deployer/META-INF/resteasy-jboss-beans.xml

      ./server/default/deployers/resteasy.deployer/resteasy-atom-provider-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/jboss-as-resteasy-6.1.0.Final.jar

      ./server/default/deployers/resteasy.deployer/resteasy-yaml-provider-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/resteasy-jackson-provider-2.3.4.Final.jar

      ./server/default/deployers/resteasy.deployer/resteasy-multipart-provider-2.3.4.Final.jar

       

      19.10 09:50:33,054 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/production-support].[Resteasy]] (http-0.0.0.0-8080-3:) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.LinkageError: com/ecolane/mpk/rest/dao/StatusElement

              at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:351)

              at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:220)

              at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:196)

              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:551)

              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:513)

              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)

              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:95

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.LinkageError: com/ecolane/mpk/rest/dao/StatusElement

              at $Proxy334.evictCache(Unknown Source)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)

              at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)

              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)

              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)

              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:536)

              ... 25 more