Uploaded image for project: 'ZZZ-WSO2 Carbon'
  1. ZZZ-WSO2 Carbon
  2. CARBON-12802

LinkageError: loader constraint violation: when resolving overridden method "com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Ljava x/xml/stream/XMLStreamReader;Ljava/lang/Class;)Ljavax/xml/bind/JAXBElement

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Highest
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Labels:
      None
    • Environment:

      windows 7, jdk.1.7

    • Severity:
      Blocker
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      Steps to reproduce:
      ===============
      1. Follow the readme in jaxrs_basic sample and deploy the jax-rs service
      2. Run client (mvn -Pclient)

      SEVERE: Servlet.service() for servlet [cxf] in context with path [/jaxrs_basic]
      threw exception [Servlet execution threw an exception] with root cause
      java.lang.LinkageError: loader constraint violation: when resolving overridden method "com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Ljava
      x/xml/stream/XMLStreamReader;Ljava/lang/Class;)Ljavax/xml/bind/JAXBElement;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoa
      der) of the current class, com/sun/xml/bind/v2/runtime/unmarshaller/UnmarshallerImpl, and its superclass loader (instance of <bootloader>), have different Class
      objects for the type allerImpl.unmarshal(Ljavax/xml/stream/XMLStreamReader;Ljava/lang/Class;)Ljavax/xml/bind/JAXBElement; used in the signature
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createUnmarshaller(JAXBContextImpl.java:776)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createUnmarshaller(JAXBContextImpl.java:141)
      at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createUnmarshaller(AbstractJAXBProvider.java:455)
      at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:161)
      at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1036)
      at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:616)
      at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:580)
      at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:238)
      at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:89)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:125)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:60)
      at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:155)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1600)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

      Apr 03, 2012 6:24:51 PM org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet [cxf] in context with path [/jaxrs_basic]
      threw exception [Servlet execution threw an exception] with root cause
      java.lang.LinkageError: loader constraint violation: when resolving overridden m
      ethod "com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Ljava
      x/xml/stream/XMLStreamReader;Ljava/lang/Class;)Ljavax/xml/bind/JAXBElement;" the
      class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoa
      der) of the current class, com/sun/xml/bind/v2/runtime/unmarshaller/Unmarshaller
      Impl, and its superclass loader (instance of <bootloader>), have different Class
      objects for the type allerImpl.unmarshal(Ljavax/xml/stream/XMLStreamReader;Ljav
      a/lang/Class;)Ljavax/xml/bind/JAXBElement; used in the signature
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createUnmarshaller(JAXBCo
      ntextImpl.java:776)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createUnmarshaller(JAXBCo
      ntextImpl.java:141)
      at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createUnmarshaller
      (AbstractJAXBProvider.java:455)
      at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElemen
      tProvider.java:161)
      at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.
      java:1036)
      at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.jav
      a:616)
      at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.ja
      va:580)
      at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JA
      XRSInInterceptor.java:238)
      at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAX
      RSInInterceptor.java:89)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
      orChain.java:263)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
      ationObserver.java:123)
      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(Abstract
      HTTPDestination.java:207)
      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
      ServletController.java:213)
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
      roller.java:154)
      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpr
      ingServlet.java:126)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab
      stractHTTPServlet.java:185)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH
      TTPServlet.java:108)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract
      HTTPServlet.java:164)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:224)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:98)
      at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValv
      e.java:60)
      at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.inv
      oke(CarbonStuckThreadDetectionValve.java:155)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
      11Processor.java:987)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
      AbstractProtocol.java:579)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoin
      t.java:1600)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
      java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
      .java:603)
      at java.lang.Thread.run(Thread.java:722)

        Attachments

          Activity

            People

            • Assignee:
              isuru@wso2.com Isuru Suriarachchi
              Reporter:
              charitha@wso2.com Charitha Kankanamge
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: