我在骆驼路线上得到一个相当奇怪的例外。它将一个类与自身进行比较,并将它们标识为不同的类型。我只能假设是ClassLoader问题的结果。为了清晰起见,这是格式化的例外(完整跟踪到下面)。
java.lang.IllegalArgumentException:
Part {http://ws.someco.com/messageserv}createMsgRequest
should be of type
com.someco.ws.messageserv.CreateMsgRequest,
not com.someco.ws.messageserv.CreateMsgRequest
有人可以建议解决方案吗?
以下是一些版本细节:
JBoss Fuse (6.2.1.redhat-084)
[installed ] [2.15.1.redhat-621084 ] camel-cxf camel-2.15.1.redhat-621084
[installed ] [1.2.0.redhat-621084 ] fabric-cxf fabric-1.2.0.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-specs cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-core cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-wsdl cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-http cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-http-jetty cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-bindings-soap cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-jaxws cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-jaxrs cxf-3.0.4.redhat-621084
[installed ] [3.0.4.redhat-621084 ] cxf-databinding-jaxb cxf-3.0.4.redhat-621084
这是来自记录的错误
2016-09-28 15:18:44,541 | ERROR | tp1704597020-170 | DefaultErrorHandler | 198 - org.apache.camel.camel-core - 2.15.1.redhat-621084 | Failed delivery for (MessageId: ID-IFDS3854-57235-1475090154837-1-1 on ExchangeId: ID-IFDS3854-57235-1475090154837-1-2). Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: Part {http://ws.someco.com/messageserv}createMsgRequest should be of type com.someco.ws.messageserv.CreateMsgRequest, not com.someco.ws.messageserv.CreateMsgRequest
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[route2 ] [route2 ] [cxf://bean:msgservpocEndpoint ] [ 256]
[route2 ] [removeHeaders2 ] [removeHeaders[*] ] [ 1]
[route2 ] [log4 ] [log ] [ 1]
[route2 ] [to3 ] [ref:createMsgReqTransformer ] [ 97]
[route2 ] [process2 ] [ref:imageProcessor ] [ 0]
[route2 ] [setHeader2 ] [setHeader[operationName] ] [ 0]
[route2 ] [log5 ] [log ] [ 1]
[route2 ] [messageservEndpoin] [cxf:bean:messageservEndpoint?defaultOperationName=createMsg&defaultOperationNa] [ 152]
Exchange
---------------------------------------------------------------------------------------------------------------------------------------
Exchange[
Id ID-IFDS3854-57235-1475090154837-1-2
ExchangePattern InOut
Headers {CamelRedelivered=false, CamelRedeliveryCounter=0, operationName=createMsg}
BodyType java.util.ArrayList
Body [com.someco.ws.messageserv.CreateMsgRequest@161e2951]
]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
java.lang.IllegalArgumentException: Part {http://ws.someco.com/messageserv}createMsgRequest should be of type com.someco.ws.messageserv.CreateMsgRequest, not com.someco.ws.messageserv.CreateMsgRequest
at org.apache.cxf.jaxb.io.DataWriterImpl.checkPart(DataWriterImpl.java:292)[79:org.apache.cxf.cxf-rt-databinding-jaxb:3.0.4.redhat-621084]
at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:220)[79:org.apache.cxf.cxf-rt-databinding-jaxb:3.0.4.redhat-621084]
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:122)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:69)[78:org.apache.cxf.cxf-rt-wsdl:3.0.4.redhat-621084]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:418)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:116)[207:org.apache.camel.camel-cxf:2.15.1.redhat-621084]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:139)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]
at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:95)[207:org.apache.camel.camel-cxf:2.15.1.redhat-621084]
at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)[207:org.apache.camel.camel-cxf:2.15.1.redhat-621084]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621084]
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)[205:org.apache.cxf.cxf-rt-transports-http-jetty:3.0.4.redhat-621084]
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[205:org.apache.cxf.cxf-rt-transports-http-jetty:3.0.4.redhat-621084]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.Server.handle(Server.java:370)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[86:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]