Issue with camel-soap - <dataFormats> - JAXBContext not created
----------------------------------------------------------------
Key: CAMEL-3499
URL: https://issues.apache.org/jira/browse/CAMEL-3499
Project: Camel
Issue Type: Bug
Affects Versions: 2.5.0
Environment: Apache Karaf 2.1-SNAPSHOT
Reporter: Charles Moulliard
I would like to use camel-soap into the following camel route
<cxf:cxfEndpoint id="busServicesFinder"
address="http://localhost:8282/cxf/serviceFinder"
serviceClass="fr.client.proxy.Services">
</cxf:cxfEndpoint>
<camelContext trace="true" xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<soapjaxb id="soap" contextPath="fr.client.proxy"/>
</dataFormats>
<route>
<from uri="cxf:bean:busServicesFinder?dataFormat=MESSAGE"/>
<log message="WebService called" loggingLevel="INFO"/>
<!-- <convertBodyTo type="String"/> -->
<unmarshal ref="soap"/>
...
but I get the following error in karaf when CXF extract the content and parse
it with JAXB
Additional info
> * which jaxb bundle is/are deployed ?
[ 200] [Active ] [ ] [ ] [ 60] Apache
ServiceMix :: Bundles :: jaxb-impl (2.1.13.1)
> * does the system bundle export the sun packages ?
No
200 com.sun.xml.bind.v2
200 com.sun.xml.bind.v2.model.annotation
200 com.sun.xml.bind.unmarshaller
200 com.sun.xml.bind.api.impl
200 com.sun.xml.bind.v2.schemagen.episode
200 com.sun.xml.bind.v2.util
200 com.sun.xml.bind.v2.runtime.unmarshaller
200 com.sun.xml.bind.marshaller
200 com.sun.xml.bind.v2.model.runtime
200 com.sun.xml.bind.v2.runtime.reflect.opt
200 com.sun.xml.bind.v2.schemagen.xmlschema
200 com.sun.xml.bind
200 com.sun.xml.bind.v2.model.core
200 com.sun.xml.bind.v2.runtime.output
200 com.sun.xml.bind.v2.bytecode
200 com.sun.xml.bind.api
200 com.sun.xml.bind.v2.model.impl
200 com.sun.xml.bind.v2.model.nav
200 com.sun.xml.bind.v2.schemagen
200 com.sun.xml.bind.util
200 com.sun.xml.bind.v2.runtime.reflect
200 com.sun.xml.bind.v2.runtime
200 com.sun.xml.bind.annotation
200 com.sun.xml.bind.v2.runtime.property
> * is there a boot delegation on the com.sun.* packages from the jre ?
Yes (karaf - 2.1-SNAPSHOT)
{code}
as thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unable to create context
at
org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer.java:223)[600:org.apache.camel.camel-cxf:2.5.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(CxfConsumer.java:200)[600:org.apache.camel.camel-cxf:2.5.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:113)[600:org.apache.camel.camel-cxf:2.5.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:68)[600:org.apache.camel.camel-cxf:2.5.0]
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[598:org.apache.cxf.bundle:2.2.11]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_22]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_22]
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[598:org.apache.cxf.bundle:2.2.11]
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[598:org.apache.cxf.bundle:2.2.11]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)[598:org.apache.cxf.bundle:2.2.11]
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:111)[598:org.apache.cxf.bundle:2.2.11]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:311)[598:org.apache.cxf.bundle:2.2.11]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:275)[598:org.apache.cxf.bundle:2.2.11]
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[598:org.apache.cxf.bundle:2.2.11]
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.Server.handle(Server.java:326)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)[569:org.apache.servicemix.bundles.jetty-bundle:6.1.22.1]
Caused by: java.io.IOException: Unable to create context
at
org.apache.camel.util.IOHelper.createIOException(IOHelper.java:80)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.util.IOHelper.createIOException(IOHelper.java:72)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.converter.jaxb.JaxbDataFormat.unmarshal(JaxbDataFormat.java:151)[602:org.apache.camel.camel-jaxb:2.5.0]
at
org.apache.camel.dataformat.soap.SoapJaxbDataFormat.unmarshal(SoapJaxbDataFormat.java:226)[603:org.apache.camel.camel-soap:2.5.0]
at
org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:51)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:143)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:78)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[202:org.apache.camel.camel-core:2.5.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:80)[600:org.apache.camel.camel-cxf:2.5.0]
... 23 more
Caused by: javax.xml.bind.JAXBException: Unable to create context
- with linked exception:
[java.lang.NoSuchMethodException:
com.sun.xml.bind.v2.ContextFactory.createContext(java.lang.String,
java.lang.ClassLoader)]
at
javax.xml.bind.ContextFinder.find(ContextFinder.java:72)[198:org.apache.servicemix.specs.jaxb-api-2.1:1.5.0]
at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:77)[198:org.apache.servicemix.specs.jaxb-api-2.1:1.5.0]
at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:73)[198:org.apache.servicemix.specs.jaxb-api-2.1:1.5.0]
at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:69)[198:org.apache.servicemix.specs.jaxb-api-2.1:1.5.0]
at
org.apache.camel.dataformat.soap.SoapJaxbDataFormat.createContext(SoapJaxbDataFormat.java:286)[603:org.apache.camel.camel-soap:2.5.0]
at
org.apache.camel.converter.jaxb.JaxbDataFormat.getContext(JaxbDataFormat.java:183)[602:org.apache.camel.camel-jaxb:2.5.0]
at
org.apache.camel.converter.jaxb.JaxbDataFormat.unmarshal(JaxbDataFormat.java:126)[602:org.apache.camel.camel-jaxb:2.5.0]
... 47 more
Caused by: java.lang.NoSuchMethodException:
com.sun.xml.bind.v2.ContextFactory.createContext(java.lang.String,
java.lang.ClassLoader)
at java.lang.Class.getMethod(Class.java:1605)[:1.6.0_22]
at
javax.xml.bind.ContextFinder.find(ContextFinder.java:69)[198:org.apache.servicemix.specs.jaxb-api-2.1:1.5.0]
... 53 more
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.