本文介绍了将 camel-cxf 升级到 2.15.2 后出错.类 Cast 异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 apache camel-cxf 升级到 2.15.2 和 cxf 3.0.4 后,我在启动骆驼路线时遇到以下问题.

After upgrading to apache camel-cxf to 2.15.2 and cxf 3.0.4 I have the following problem when starting up my camel routes.

该路由与支付网关进行了肥皂集成.

The route does a soap integration with a Payment Gateway.

有没有机构找到解决方法?

Has any body found a workaround for this?

请参阅下面的堆栈跟踪.

Please see stack trace below.

引起:javax.ejb.EJBException:org.apache.camel.FailedToCreateProducerException:无法创建端点的生产者:端点[cxf://https://staging.payu.co.za/service/PayUAPI?dataFormat=PAYLOAD&portName=%7Bhttp%3A%2F%2Fsoap.api.controller.web.payjar.com%2F%7DEnterpriseAPISoapPort&ser​​viceName=%7Bhttp%3A%2F%2Fsoap.api.controller.web.payjar.com%2F%7DEnterpriseAPISoapService&wsdlURL=https%3A%2F%2Fstaging.payu.co.za%2Fservice%2FPayU3Fwsdl].原因:org.apache.camel.RuntimeCamelException:java.lang.ClassCastException:无法转换org.apache.cxf.wsdl11.WSDLManagerImpl 到org.apache.cxf.wsdl.WSDLManager 在org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)在org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:277)在org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:349)在org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)在org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)在org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)……还有 11 个

Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint:

端点[cxf://https://staging.payu.co.za/service/PayUAPI?dataFormat=PAYLOAD&portName=%7Bhttp%3A%2F%2Fsoap.api.controller.web.payjar.com%2F%7DEnterpriseAPISoapPort&ser​​viceName=%7Bhttp%3A%2F%2Fsoap.api.controller.web.payjar.com%2F%7DEnterpriseAPISoapService&wsdlURL=https%3A%2F%2Fstaging.payu.co.za%2Fservice%2FPayUAPI%3Fwsdl].原因:org.apache.camel.RuntimeCamelException:java.lang.ClassCastException:无法转换org.apache.cxf.wsdl11.WSDLManagerImpl 到org.apache.cxf.wsdl.WSDLManager 在org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:407)在org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123)在org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:219)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)在org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)在org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1272)在org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)在org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)在org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:155)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)在org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:1122)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)在org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)在org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)在org.apache.camel.impl.RouteService.startChildService(RouteService.java:340)在 org.apache.camel.impl.RouteService.warmUp(RouteService.java:182)在org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3090)在org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3020)在org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797)在org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653)在org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)在org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)在org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)在org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)在org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)在com.unijunction.ordercloud.common.bootstrap.CamelInstantiator.init(CamelInstantiator.java:58)在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在 java.lang.reflect.Method.invoke(Method.java:606) 在org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:114)在org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:103)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)在org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)在org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:107)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.weld.ejb.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:100)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)在org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)……还有 27 个

Endpoint[cxf://https://staging.payu.co.za/service/PayUAPI?dataFormat=PAYLOAD&portName=%7Bhttp%3A%2F%2Fsoap.api.controller.web.payjar.com%2F%7DEnterpriseAPISoapPort&serviceName=%7Bhttp%3A%2F%2Fsoap.api.controller.web.payjar.com%2F%7DEnterpriseAPISoapService&wsdlURL=https%3A%2F%2Fstaging.payu.co.za%2Fservice%2FPayUAPI%3Fwsdl]. Reason: org.apache.camel.RuntimeCamelException: java.lang.ClassCastException: Cannot cast org.apache.cxf.wsdl11.WSDLManagerImpl to org.apache.cxf.wsdl.WSDLManager at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:407) at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123) at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:219) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89) at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89) at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1272) at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44) at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89) at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:155) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89) at org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:1122) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103) at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89) at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) at org.apache.camel.impl.RouteService.startChildService(RouteService.java:340) at org.apache.camel.impl.RouteService.warmUp(RouteService.java:182) at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3090) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3020) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432) at com.unijunction.ordercloud.common.bootstrap.CamelInstantiator.init(CamelInstantiator.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:114) at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:103) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437) at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73) at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:107) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.weld.ejb.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:100) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275) ... 27 more

Caused by: org.apache.camel.RuntimeCamelException: java.lang.ClassCastException: Cannot cast

org.apache.cxf.wsdl11.WSDLManagerImpl 到org.apache.cxf.wsdl.WSDLManager 在org.apache.camel.component.cxf.WSDLServiceFactoryBean.getDefinition(WSDLServiceFactoryBean.java:66)在org.apache.camel.component.cxf.WSDLServiceFactoryBean.buildServiceFromWSDL(WSDLServiceFactoryBean.java:101)在org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525)在org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)在org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215)在org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)在org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91)在org.apache.camel.component.cxf.CxfEndpoint.createClient(CxfEndpoint.java:634)在org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:76)在org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)在org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869)在org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1097)在org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1058)在org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:405)... 104 更多

org.apache.cxf.wsdl11.WSDLManagerImpl to org.apache.cxf.wsdl.WSDLManager at org.apache.camel.component.cxf.WSDLServiceFactoryBean.getDefinition(WSDLServiceFactoryBean.java:66) at org.apache.camel.component.cxf.WSDLServiceFactoryBean.buildServiceFromWSDL(WSDLServiceFactoryBean.java:101) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) at org.apache.camel.component.cxf.CxfEndpoint.createClient(CxfEndpoint.java:634) at org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:76) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869) at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1097) at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1058) at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:405) ... 104 more

Caused by: java.lang.ClassCastException: Cannot cast org.apache.cxf.wsdl11.WSDLManagerImpl to

org.apache.cxf.wsdl.WSDLManager 在java.lang.Class.cast(Class.java:3186) 在org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:322)在org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:216)在org.apache.camel.component.cxf.WSDLServiceFactoryBean.getDefinition(WSDLServiceFactoryBean.java:64)... 117 更多

org.apache.cxf.wsdl.WSDLManager at java.lang.Class.cast(Class.java:3186) at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:322) at org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:216) at org.apache.camel.component.cxf.WSDLServiceFactoryBean.getDefinition(WSDLServiceFactoryBean.java:64) ... 117 more

推荐答案

camel 和 cfx 发现的常见问题:

Common problems found with camel and cfx:

  • 阴影 jar 文件中存在重复版本的骆驼/cfx,因为我发现 cxf 存在问题 - 3.0.12 和 3.1.10.
  • camel TypeConverter 的问题.

解决方案:

  • Maven 依赖项、apache cxf 版本 2.7.18 和 apache camel 版本 2.17.2.

cxf-bundle

骆驼核

骆驼-cxf

  • 将其包含在阴影 maven pom 中,

  • Include this in the shaded maven pom,

            <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                <resource>META-INF/services/org/apache/camel/TypeConverter</resource>
            </transformer>

这篇关于将 camel-cxf 升级到 2.15.2 后出错.类 Cast 异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 21:27