Jboss保险丝6.3 + EAP 6.4 ClassCastException:类org.apache.cxf.jaxb.JAXBDataBinding

时间:2018-12-03 15:08:46

标签: java jboss cxf classcastexception jboss-eap-6

我使用Jboss Fuse的第一个Web服务遇到了一个大问题。
我需要构建一个SOAP WSDL Web服务,它必须在EAP 6.4上运行,这是我的jboss-camel-context:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:cxf="http://camel.apache.org/schema/cxf"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">
    <import resource="classpath:META-INF/cxf/cxf.xml"/>
    <bean class="com.test.camle_cxf_test_v1.CamelServiceRoute"
        id="camel" scope="singleton"/>
    <cxf:cxfEndpoint address="/TestRetrieve" id="customerEndpoint" serviceClass="com.test.ExamplePortType">
        <cxf:properties>
            <entry key="dataFormat" value="MESSAGE"/>
        </cxf:properties>
    </cxf:cxfEndpoint>
    <camelContext id="spring-context" xmlns="http://camel.apache.org/schema/spring">
        <route id="_route1">
            <from id="_from1" uri="cxf:bean:customerEndpoint"/>
            <process id="_process1" ref="camel"/>
        </route>
    </camelContext>
</beans>

在使用maven构建软件包之后,我将战争放在jboss的软件包“ deployments”下,但是在部署期间我收到此错误:

  

产生于:java.lang.ClassCastException:class   org.apache.cxf.jaxb.JAXBDataBinding位于   java.lang.Class.asSubclass(Class.java:3218)[rt.jar:1.7.0_80-ea]在   org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:269)     在   org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.getJAXBClass(ReflectionServiceFactoryBean.java:239)     在   org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createDefaultDataBinding(ReflectionServiceFactoryBean.java:219)

我该如何解决此异常?

非常感谢您。

关于, Matteo。

0 个答案:

没有答案