JBoss:NoClassDefFoundError RuntimeBuiltinLeafInfoImpl

时间:2016-09-06 12:33:47

标签: spring jboss jaxb cxf

我收到以下错误,即使com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl类存在于jaxb-impl-2.2.11 jar中。

错误Stacktrace:

import PyQt5

...

Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]

启动JBoss 7服务器时出错。 Application有Spring 4.3.2和cxf 3.1.7依赖。

请在类路径中找到以下相关的jar:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl
    at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:63) [jaxb-impl-2.2.11.jar:2.2.11]

相关的pom依赖项:

<resource-root path="cxf-bundle-compatible-3.1.7.jar"/>
<resource-root path="cxf-core-3.1.7.jar"/>
<resource-root path="cxf-rt-bindings-corba-3.1.7.jar"/>
<resource-root path="cxf-rt-bindings-soap-3.1.7.jar"/>
<resource-root path="cxf-rt-bindings-xml-3.1.7.jar"/>
<resource-root path="cxf-rt-databinding-aegis-3.1.7.jar"/>
<resource-root path="cxf-rt-databinding-jaxb-3.1.7.jar"/>
<resource-root path="cxf-rt-databinding-xmlbeans-3.1.7.jar"/>
<resource-root path="cxf-rt-frontend-jaxrs-3.1.7.jar"/>
<resource-root path="cxf-rt-frontend-jaxws-3.1.7.jar"/>
<resource-root path="cxf-rt-frontend-simple-3.1.7.jar"/>
<resource-root path="cxf-rt-javascript-3.1.7.jar"/>
<resource-root path="cxf-rt-management-3.1.7.jar"/>
<resource-root path="cxf-rt-rs-client-3.1.7.jar"/>
<resource-root path="cxf-rt-rs-service-description-3.1.7.jar"/>
<resource-root path="cxf-rt-transports-http-3.1.7.jar"/>
<resource-root path="cxf-rt-transports-http-jetty-3.1.7.jar"/>
<resource-root path="cxf-rt-transports-jms-3.1.7.jar"/>
<resource-root path="cxf-rt-transports-local-3.1.7.jar"/>
<resource-root path="cxf-rt-ws-addr-3.1.7.jar"/>
<resource-root path="cxf-rt-ws-policy-3.1.7.jar"/>
<resource-root path="cxf-rt-wsdl-3.1.7.jar"/>
<resource-root path="cxf-tools-common-3.1.7.jar"/>
<resource-root path="cxf-tools-corba-3.1.7.jar"/>
<resource-root path="cxf-tools-java2ws-3.1.7.jar"/>
<resource-root path="cxf-tools-misctools-3.1.7.jar"/>
<resource-root path="cxf-tools-validator-3.1.7.jar"/>
<resource-root path="cxf-tools-wadlto-jaxrs-3.1.7.jar"/>
<resource-root path="cxf-tools-wsdlto-core-3.1.7.jar"/>
<resource-root path="cxf-tools-wsdlto-databinding-jaxb-3.1.7.jar"/>
<resource-root path="cxf-tools-wsdlto-frontend-javascript-3.1.7.jar"/>
<resource-root path="cxf-tools-wsdlto-frontend-jaxws-3.1.7.jar"/>


<resource-root path="javax.ws.rs-api-2.0.1.jar"/>
<resource-root path="javax.xml.soap-api-1.3.5.jar"/>
<resource-root path="jaxb-api-2.2.11.jar"/>
<resource-root path="jaxb-core-2.2.11.jar"/>
<resource-root path="jaxb-impl-2.2.11.jar"/>
<resource-root path="jaxb-xjc-2.2.11.jar"/>
<resource-root path="jaxws-api-2.2.11.jar"/>

<resource-root path="jersey-bundle-1.19.2.jar"/>
<resource-root path="jettison-1.2.jar"/>

<resource-root path="spring-beans-4.3.2.RELEASE.jar"/>
<resource-root path="spring-context-4.3.2.RELEASE.jar"/>
<resource-root path="spring-context-support-4.3.2.RELEASE.jar"/>
<resource-root path="spring-core-4.3.2.RELEASE.jar"/>
<resource-root path="spring-expression-4.3.2.RELEASE.jar"/>

<resource-root path="stax2-api-3.1.4.jar"/>
<resource-root path="wsdl4j-1.6.3.jar"/>
<resource-root path="xalan-2.7.0.jar"/>
<resource-root path="xml-apis-1.0.b2.jar"/>
<resource-root path="xml-resolver-1.2.jar"/>
<resource-root path="xmlbeans-2.6.0.jar"/>
<resource-root path="xmlpull-1.1.3.1.jar"/>
<resource-root path="xmlschema-core-2.2.1.jar"/>
<resource-root path="xpp3_min-1.1.4c.jar"/>
<resource-root path="xstream-1.4.7.jar"/>

1 个答案:

答案 0 :(得分:0)

在module.xml文件中添加以下依赖项后出错:

<module name="javax.jws.api" />
<module name="javaee.api" />
<module name="javax.annotation.api" />