activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Purcell <tpurc...@chariotsolutions.com>
Subject Re: JAXB Version Conflict
Date Tue, 22 Apr 2008 14:26:22 GMT

Chris

JAXB 2.1 may be backward compatible but it looks like CXFServlet does not
care. At any rate the exclusion(added to my web app pom) in my previous post
is working fine.

Thanks
Tom


Chris Custine (Apache) wrote:
> 
> Hi Tom,
> I think JAXB 2.1 is backwards compatible with 2.0, so I would try a
> dependencyManagement section of your webapp pom and in there, set the
> jaxb-api version to 2.1.  This *should* force that version even for
> transient dependencies, but if it doesn't work you may have to do an
> exclusion of the jaxb dependencies from the ActiveMQ dependency.
> 
> I would be curious to know if this works for you because I think it is
> going
> to become a common issue here really soon.
> 
> Hope this helps!
> 
> Chris
> 
> On Fri, Apr 18, 2008 at 10:04 AM, Tom Purcell
> <tpurcell@chariotsolutions.com>
> wrote:
> 
>>
>> Hello
>>
>> We are attempting to use the new CXF REST support to expose a webapp.
>> When
>> I
>> say new I mean we're using the CXF 2.1-incubator-SNAPSHOT. The web app
>> also
>> needs to fire JMS messages. For that we are, of course, using ActiveMq
>> (5.0.0).
>>
>> The problem we are having is that it appears the new CXF uses JAXB 2.1
>> but
>> ActiveMq is on JAXB 2.0 (stack trace below).
>>
>> Is there a way to get around this?
>>
>> Thanks
>> Tom
>>
>> 2008-04-18 08:48:40,907 [http-8080-1] (StandardWrapperValve.java:274)
>> ERROR
>>
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/wile].[CXFServlet]
>> - Servlet.service() for servlet CXFServlet threw exception
>> java.lang.LinkageError: JAXB 2.0 API jar is being loaded (from
>>
>> jar:file:/data/tomcat/apache-tomcat-6.0-snapshot/webapps/wile/WEB-INF/lib/jaxb-api-2.0.jar!/javax/xml/bind/annotation/XmlSchema.class),
>> but this RI (from
>>
>> jar:file:/data/tomcat/apache-tomcat-6.0-snapshot/webapps/wile/WEB-INF/lib/jaxb-impl-2.1.6.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
>> requires JAXB 2.1 API jar.
>>        at
>>
>> com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
>>        at
>>
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
>>        at
>>
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
>>        at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
>>        at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
>>        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:585)
>>        at
>> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
>>        at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
>>        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
>>        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
>>        at
>>
>> org.apache.cxf.jaxrs.provider.JAXBElementProvider.getJAXBContext(JAXBElementProvider.java:89)
>>        at
>>
>> org.apache.cxf.jaxrs.provider.JAXBElementProvider.writeTo(JAXBElementProvider.java:72)
>>        at
>>
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:110)
>>        at
>>
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
>>        at
>>
>> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)
>>        at
>>
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
>>        at
>>
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>>        at
>>
>> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
>>        at
>>
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
>>        at
>>
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:113)
>>        at
>>
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
>>        at
>>
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:152)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>        at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>        at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>        at
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>        at
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>>        at
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>>        at
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>        at
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>        at
>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>>        at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>>        at
>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>>        at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>        at java.lang.Thread.run(Thread.java:595)
>> 2008-04-18 09:03:22,396
>> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
>> (HostConfig.java:1041) INFO  org.apache.catalina.startup.HostConfig -
>> Undeploying context [/wile]
>> 2008-04-18 09:03:22,402
>> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
>> (ApplicationContext.java:660) ERROR
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/wile] -
>> Servlet CXFServlet threw unload() exception
>> javax.servlet.ServletException: Servlet.destroy() for servlet CXFServlet
>> threw exception
>>        at
>> org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1401)
>>        at
>> org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1727)
>>        at
>> org.apache.catalina.core.StandardContext.stop(StandardContext.java:4502)
>>        at
>> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
>>        at
>>
>> org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1044)
>>        at
>> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1212)
>>        at
>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
>>        at
>>
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>>        at
>>
>> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
>>        at
>>
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
>>        at
>>
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
>>        at
>>
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
>>        at java.lang.Thread.run(Thread.java:595)
>> Caused by: java.lang.NoClassDefFoundError:
>> org/apache/cxf/transport/MultipleEndpointObserver
>>        at org.apache.cxf.endpoint.ServerImpl.stop(ServerImpl.java:143)
>>        at
>>
>> org.apache.cxf.endpoint.ServerRegistryImpl.preShutdown(ServerRegistryImpl.java:87)
>>        at
>>
>> org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:77)
>>        at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:116)
>>        at
>>
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.destroy(AbstractCXFServlet.java:144)
>>        at
>> org.apache.cxf.transport.servlet.CXFServlet.destroy(CXFServlet.java:155)
>>        at
>> org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1382)
>>        ... 12 more
>> --
>> View this message in context:
>> http://www.nabble.com/JAXB-Version-Conflict-tp16763543s2354p16763543.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/JAXB-Version-Conflict-tp16763543s2354p16824311.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message