当前位置: 首页 > 知识库问答 >
问题:

Camel cxf 2.18.2正在抛出TypeConversionException

邹开畅
2023-03-14

我试图升级骆驼cxf从2.15.0到2.18.2和得到以下异常。

JDK版本是1.8

使用SOAP服务的CXFendpoint如下

endpoint id=“OTAHotelAvailability\u OTA\u 2012B\u endpoint”uri=“cxf:/HotelAvailabilityPort?wsdlURL=${wsdlpath}/test.wsdl

下一条从CXFendpoint消费并进行实际业务的路线。

从uri="ref:OTAHotelAvailability_OTA_2012B_EndPoint"到uri="处理器"

代码在camel-cxf 2.15.0中运行良好,但当我升级到2.18.2时抛出以下异常。

异常跟踪。

org.apache.camel.TypeConversionException: Error during type conversion from type: java.lang.String to the required type: java.lang.String with value org.apache.camel.component.cxf.CxfPayload@6ad3b0a2 due net.sf.saxon.trans.XPathException: A source of type javax.xml.transform.stax.StAXSource is not supported in this environ
        at org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:629)
        at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:150)
        at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:78)
        at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:53)
        at org.apache.camel.builder.ExpressionBuilder$45.evaluate(ExpressionBuilder.java:1105)
        at org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)
        at org.apache.camel.builder.SimpleBuilder.evaluate(SimpleBuilder.java:92)
        at org.apache.camel.processor.TransformProcessor.process(TransformProcessor.java:50)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
        at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
        at org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.syncInvoke(CxfConsumer.java:209)
        at org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.invoke(CxfConsumer.java:136)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)

共有1个答案

解修然
2023-03-14

在类似的情况下,我使用了以下代码,解决了我的问题:-

.to(cxf:bean:cxfEndpointBeanId).streamCaching()
 类似资料:
  • 我使用的是SpringBoot2.2。2.发布,version 在 超时失败统计(总计=30,活动=1,空闲=29,等待=163) 有29个空闲连接,仍然发生超时故障。

  • 我有一个非常简单/基本的Web应用程序。当我跑的时候 mvn部署-e 我在控制台中看到以下错误。 [错误]无法执行目标组织。阿帕奇。专家plugins:maven deploy plugin:2.7:project TestWebApp上的部署(默认部署):部署失败:未在POM inside distributionManagement元素或-DaltDeploymentRepository=id

  • 我正在使用Spring Boot和ElasticSearch。当我试图使用Spring升级时,当ElasticSearch中没有文档时,它会抛出。当ElasticSearch中存在文档时,同样的代码也可以正常工作。 异常堆栈跟踪: 组织。springframework。数据弹性搜索。ElasticsearchException:批量索引失败。使用ElasticsearchException。get

  • 这是我连接HTTP的代码。 这就是android。操作系统。NetworkOnMainThreadException 请帮忙。

  • 有人能告诉我为什么这个代码不起作用吗?它抛出。 错误:

  • 我试图从数据库表中获取在字段创建的