我在jboss7.0 war中使用CXFServlet
当所有jar文件都保存在war文件的lib中时。我能够成功。
但是当从lib移到模块时。我面临以下错误
错误信息:
原因:java.util.ServiceConfigurationError:javax.servlet.ServletContainerInitializer:提供程序org.springframework.web.SpringServletContainerInitializer不是子类型\“
罐子的清单
<resources>
<resource-root path="activation-1.1.jar"/>
<resource-root path="adapter-commons-7.3.0.33.jar"/>
<resource-root path="annotations-2.0.1.jar"/>
<resource-root path="antisamy-bin-1.3.jar"/>
<resource-root path="async-http-client-1.9.31.jar"/>
<resource-root path="AWSAPIGatewayDataAdapter-7.3.0.33.jar"/>
<resource-root path="aws-java-sdk-core-1.11.78.jar"/>
<resource-root path="aws-java-sdk-ec2-1.11.78.jar"/>
<resource-root path="aws-java-sdk-elasticbeanstalk-1.11.78.jar"/>
<resource-root path="aws-java-sdk-kms-1.11.78.jar"/>
<resource-root path="aws-java-sdk-s3-1.11.78.jar"/>
<resource-root path="aws-java-sdk-ses-1.11.78.jar"/>
<resource-root path="aws-java-sdk-sns-1.11.78.jar"/>
<resource-root path="aws-java-sdk-sqs-1.11.78.jar"/>
<resource-root path="batik-css-1.0.0.jar"/>
<resource-root path="batik-util-1.0.0.jar"/>
<resource-root path="bcmail-jdk15on-1.49.jar"/>
<resource-root path="bcpkix-jdk15on-1.49.jar"/>
<resource-root path="bcprov-jdk15on-1.50.jar"/>
<resource-root path="btf-1.2.jar"/>
<resource-root path="c3p0-0.9.1.1.jar"/>
<resource-root path="cal10n-api-0.7.4.jar"/>
<resource-root path="com.ibm.mq.commonservices.jar"/>
<resource-root path="com.ibm.mq.connector.jar"/>
<resource-root path="com.ibm.mq.headers.jar"/>
<resource-root path="com.ibm.mq.jar"/>
<resource-root path="com.ibm.mq.jmqi.jar"/>
<resource-root path="com.ibm.mq.jmqi.local.jar"/>
<resource-root path="com.ibm.mq.jmqi.remote.jar"/>
<resource-root path="com.ibm.mq.jmqi.system.jar"/>
<resource-root path="com.ibm.mq.jms.admin.jar"/>
<resource-root path="com.ibm.mqjms.jar"/>
<resource-root path="com.ibm.mq.pcf.jar"/>
<resource-root path="com.ibm.msg.client.commonservices.j2se.jar"/>
<resource-root path="com.ibm.msg.client.commonservices.jar"/>
<resource-root path="com.ibm.msg.client.jms.internal.jar"/>
<resource-root path="com.ibm.msg.client.jms.jar"/>
<resource-root path="com.ibm.msg.client.matchspace.jar"/>
<resource-root path="com.ibm.msg.client.provider.jar"/>
<resource-root path="com.ibm.msg.client.ref.jar"/>
<resource-root path="com.ibm.msg.client.wmq.common.jar"/>
<resource-root path="com.ibm.msg.client.wmq.factories.jar"/>
<resource-root path="com.ibm.msg.client.wmq.jar"/>
<resource-root path="com.ibm.msg.client.wmq.v6.jar"/>
<resource-root path="common-lang3.jar"/>
<resource-root path="commons-beanutils-1.8.2.jar"/>
<resource-root path="commons-beanutils-1.9.2.jar"/>
<resource-root path="commons-codec-1.10.jar"/>
<resource-root path="commons-codec-1.8.jar"/>
<resource-root path="commons-collections-3.2.1.jar"/>
<resource-root path="commons-collections-3.2.2.jar"/>
<resource-root path="commons-configuration-1.5.jar"/>
<resource-root path="commons-configuration-1.8.jar"/>
<resource-root path="commons-digester-1.6.jar"/>
<resource-root path="commons-discovery-0.2.jar"/>
<resource-root path="commons-fileupload-1.3.1.jar"/>
<resource-root path="commons-httpclient-3.1.jar"/>
<resource-root path="commons-httpclient-3.1-rc1.jar"/>
<resource-root path="commons-io-2.4.jar"/>
<resource-root path="commons-jxpath-1.2.jar"/>
<resource-root path="commons-lang-2.6.jar"/>
<resource-root path="commons-lang3-3.2.1.jar"/>
<resource-root path="commons-lib-5.6.2.66.jar"/>
<resource-root path="commons-lib-7.3.0.4.jar"/>
<resource-root path="commons-logging-1.1.1.jar"/>
<resource-root path="commons-logging-1.2.jar"/>
<resource-root path="commons-pool-1.4.jar"/>
<resource-root path="commons-validator-1.3.1.jar"/>
<resource-root path="concurrent-1.0.jar"/>
<resource-root path="cxf-api-2.4.6.jar"/>
<resource-root path="cxf-common-utilities-2.4.6.jar"/>
<resource-root path="cxf-manifest.jar"/>
<resource-root path="cxf-rt-bindings-coloc-2.4.6.jar"/>
<resource-root path="cxf-rt-bindings-http-2.4.6.jar"/>
<resource-root path="cxf-rt-bindings-object-2.4.6.jar"/>
<resource-root path="cxf-rt-bindings-soap-2.4.6.jar"/>
<resource-root path="cxf-rt-bindings-xml-2.4.6.jar"/>
<resource-root path="cxf-rt-core-2.4.6.jar"/>
<resource-root path="cxf-rt-databinding-aegis-2.4.6.jar"/>
<resource-root path="cxf-rt-databinding-jaxb-2.4.6.jar"/>
<resource-root path="cxf-rt-frontend-jaxws-2.4.6.jar"/>
<resource-root path="cxf-rt-frontend-simple-2.4.6.jar"/>
<resource-root path="cxf-rt-management-2.4.6.jar"/>
<resource-root path="cxf-rt-transports-common-2.4.6.jar"/>
<resource-root path="cxf-rt-transports-http-2.4.6.jar"/>
<resource-root path="cxf-rt-transports-jms-2.4.6.jar"/>
<resource-root path="cxf-rt-transports-local-2.4.6.jar"/>
<resource-root path="cxf-rt-ws-addr-2.4.6.jar"/>
<resource-root path="cxf-rt-ws-policy-2.4.6.jar"/>
<resource-root path="cxf-rt-ws-rm-2.4.6.jar"/>
<resource-root path="cxf-rt-ws-security-2.4.6.jar"/>
<resource-root path="cxf-tools-common-2.4.6.jar"/>
<resource-root path="cxf-tools-java2ws-2.4.6.jar"/>
<resource-root path="cxf-tools-validator-2.4.6.jar"/>
<resource-root path="cxf-tools-wsdlto-core-2.4.6.jar"/>
<resource-root path="cxf-tools-wsdlto-databinding-jaxb-2.4.6.jar"/>
<resource-root path="cxf-tools-wsdlto-frontend-jaxws-2.4.6.jar"/>
<resource-root path="cxf-xjc-boolean-2.4.0.jar"/>
<resource-root path="cxf-xjc-dv-2.4.0.jar"/>
<resource-root path="cxf-xjc-ts-2.4.0.jar"/>
<resource-root path="DataAdapterEngine-7.3.0.33.jar"/>
<resource-root path="DataAdapterSDK-7.3.0.33.jar"/>
<resource-root path="DataAdapterSpec-7.3.0.33.jar"/>
<resource-root path="dbsne.jar"/>
<resource-root path="derby-10.11.1.1.jar"/>
<resource-root path="dom4j-1.6.1.jar"/>
<resource-root path="elasticache-java-cluster-client-1.1.1.jar"/>
<resource-root path="ezmorph-1.0.4.jar"/>
<resource-root path="flexjson-2.1.jar"/>
<resource-root path="flyway-core-4.0.3.jar"/>
<resource-root path="forgerock-util-1.3.1.jar"/>
<resource-root path="gateway-lib-7.3.0.3.jar"/>
<resource-root path="gson-2.6.2.jar"/>
<resource-root path="guava-18.0.jar"/>
<resource-root path="hamcrest-core-1.3.jar"/>
<resource-root path="hibernate3.jar"/>
<resource-root path="hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
<resource-root path="hibernate-validator-4.1.0.Final.jar"/>
<resource-root path="HikariCP-2.4.5.jar"/>
<resource-root path="htmlparser-1.2.1.jar"/>
<resource-root path="httpasyncclient-4.0-beta3.jar"/>
<resource-root path="httpclient-4.5.2.jar"/>
<resource-root path="httpcore-4.4.4.jar"/>
<resource-root path="httpcore-nio-4.2.4.jar"/>
<resource-root path="httpmime-4.2.6.jar"/>
<resource-root path="httpmime-4.5.2.jar"/>
<resource-root path="IntegrationAdapter-7.3.0.33.jar"/>
<resource-root path="ion-java-1.0.1.jar"/>
<resource-root path="jackson-annotations-2.1.1.jar"/>
<resource-root path="jackson-annotations-2.5.3.jar"/>
<resource-root path="jackson-core-2.1.1.jar"/>
<resource-root path="jackson-core-2.5.3.jar"/>
<resource-root path="jackson-core-asl-1.9.2.jar"/>
<resource-root path="jackson-coreutils-1.8.jar"/>
<resource-root path="jackson-databind-2.1.1.jar"/>
<resource-root path="jackson-databind-2.5.3.jar"/>
<resource-root path="jackson-dataformat-cbor-2.6.6.jar"/>
<resource-root path="jackson-dataformat-yaml-2.4.5.jar"/>
<resource-root path="jackson-datatype-joda-2.4.5.jar"/>
<resource-root path="jackson-mapper-asl-1.9.2.jar"/>
<resource-root path="jackson-module-jsonSchema-2.4.4.jar"/>
<resource-root path="jasper-el-6.0.53.jar"/>
<resource-root path="javase-2.2.jar"/>
<resource-root path="javassist-3.12.1.GA.jar"/>
<resource-root path="javassist-3.15.0-GA.jar"/>
<!--resource-root path="javax.servlet-api-3.0.1.jar"/-->
<resource-root path="javax.servlet-api-3.1.0.jar"/>
<!--resource-root path="javax.servlet.jar"/-->
<!--resource-root path="javax.servlet.jsp-2.3.2.jar"/-->
<resource-root path="jaxb-api-2.1.jar"/>
<resource-root path="jaxb-api-2.2.6.jar"/>
<resource-root path="jaxb-impl-2.1.13.jar"/>
<resource-root path="jaxb-xjc-2.2.11.jar"/>
<resource-root path="jaxb-xjc-2.2.6.jar"/>
<resource-root path="jaxrpc.jar"/>
<resource-root path="jboss-logging-3.1.0.GA.jar"/>
<resource-root path="jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
<resource-root path="jcifs-1.3.17.jar"/>
<resource-root path="jcommon-1.0.13.jar"/>
<resource-root path="jcs-1.3.jar"/>
<resource-root path="jdbm.jar"/>
<resource-root path="je.jar"/>
<resource-root path="jettison-1.3.4.jar"/>
<resource-root path="jmespath-java-1.11.78.jar"/>
<resource-root path="joda-time-2.8.2.jar"/>
<resource-root path="jopt-simple-4.3.jar"/>
<resource-root path="js.jar"/>
<resource-root path="json-20140107.jar"/>
<resource-root path="json-20160212.jar"/>
<resource-root path="json-fluent-2.2.3.jar"/>
<resource-root path="json-lib-2.2.1-jdk15.jar"/>
<resource-root path="jsonlibs_2.4.0.jar"/>
<resource-root path="json-schema-core-1.2.5.jar"/>
<resource-root path="json-schema-validator-2.2.6.jar"/>
<resource-root path="json-simple-1.1.jar"/>
<resource-root path="json-web-token-2.2.3.jar"/>
<resource-root path="jsp-api-6.0.53.jar"/>
<resource-root path="jsr173_1.0_api.jar"/>
<resource-root path="jsr173-1.0.jar"/>
<resource-root path="jsr305-3.0.0.jar"/>
<resource-root path="jsr311-api-1.1.1.jar"/>
<resource-root path="jsse.jar"/>
<resource-root path="jstl-api-1.2.jar"/>
<resource-root path="jstl-impl-1.2.jar"/>
<resource-root path="jta-1.1.jar"/>
<resource-root path="jta.jar"/>
<resource-root path="jug.jar"/>
<resource-root path="juli-6.0.53.jar"/>
<resource-root path="junit-4.11.jar"/>
<resource-root path="juniversalchardet-1.0.3.jar"/>
<resource-root path="libphonenumber-6.2.jar"/>
<resource-root path="log4j-1.2.16.jar"/>
<resource-root path="log4j-1.2-api-2.3.jar"/>
<resource-root path="log4j-api-2.3.jar"/>
<resource-root path="log4j-core-2.3.jar"/>
<!--resource-root path="log4j-web-2.0.2.jar"/-->
<resource-root path="log4jwebtracker-1.0.0.jar"/>
<resource-root path="log4jwebtracker.jar"/>
<resource-root path="logadapter-1.0.0.jar"/>
<resource-root path="logadapter.jar"/>
<resource-root path="lucene-core-5.3.1.jar"/>
<resource-root path="mailapi-1.4.3.jar"/>
<resource-root path="mapper-7.3.0.1.jar"/>
<resource-root path="mariadb-java-client-1.4.6.jar"/>
<resource-root path="mchange-commons-java-0.2.6.3.jar"/>
<resource-root path="memcached-2.3.1.jar"/>
<resource-root path="mf-commons-7.3.0.13.jar"/>
<resource-root path="mf-commons-cloud-7.3.0.13.jar"/>
<resource-root path="middleware-system.jar"/>
<resource-root path="MongoAdapter-7.3.0.33.jar"/>
<resource-root path="mongo-java-driver-3.2.2.jar"/>
<resource-root path="msg-simple-1.1.jar"/>
<resource-root path="mwconfig-1.0.0.jar"/>
<resource-root path="mysql-connector-java-5.1.39.jar"/>
<resource-root path="neethi-3.0.2.jar"/>
<resource-root path="nekohtml-1.9.13.jar"/>
<resource-root path="netty-3.10.5.Final.jar"/>
<resource-root path="not-yet-commons-ssl-0.3.10.jar"/>
<resource-root path="ojdbc-6.jar"/>
<resource-root path="olingo-odata2-api-2.0.3.jar"/>
<resource-root path="olingo-odata2-core-2.0.3.jar"/>
<resource-root path="oro-2.0.8.jar"/>
<resource-root path="oscache-2.4.1.jar"/>
<resource-root path="RAMLAdapter-7.3.0.33.jar"/>
<resource-root path="raml-parser-0.8.11.jar"/>
<resource-root path="RDBMSDataAdapter-7.3.0.33.jar"/>
<resource-root path="redisson-1.0.4.jar"/>
<resource-root path="reflections-0.9.10.jar"/>
<resource-root path="rhino-1.7R4.jar"/>
<resource-root path="sac-1.3.jar"/>
<resource-root path="SalesForceAdapter-7.3.0.33.jar"/>
<resource-root path="scribe-1.3.3.jar"/>
<resource-root path="servicemodel-7.3.0.1.jar"/>
<resource-root path="SkyDataProvider-7.3.0.33.jar"/>
<resource-root path="slf4j-api-1.7.5.jar"/>
<resource-root path="slf4j-ext-1.6.3.jar"/>
<resource-root path="slf4j-log4j12-1.7.5.jar"/>
<resource-root path="snakeyaml-1.13.jar"/>
<resource-root path="spring-aop-3.2.5.RELEASE.jar"/>
<resource-root path="spring-beans-3.2.5.RELEASE.jar"/>
<resource-root path="spring-context-3.2.5.RELEASE.jar"/>
<resource-root path="spring-core-3.2.5.RELEASE.jar"/>
<resource-root path="spring-expression-3.2.5.RELEASE.jar"/>
<resource-root path="spring-jms-3.2.5.RELEASE.jar"/>
<resource-root path="spring-tx-3.2.5.RELEASE.jar"/>
<resource-root path="spring-web-4.3.14.RELEASE.jar"/>
<resource-root path="sqljdbc4-4.1.jar"/>
<resource-root path="SsoApplicationAgent.jar"/>
<resource-root path="stax-api-1.0.1.jar"/>
<resource-root path="stax-api-1.0-2.jar"/>
<resource-root path="SwaggerAdapter-7.3.0.33.jar"/>
<resource-root path="swagger-annotations-1.5.8.jar"/>
<resource-root path="swagger-core-1.5.10.jar"/>
<resource-root path="swagger-models-1.5.8.jar"/>
<resource-root path="swagger-parser-1.0.22.jar"/>
<resource-root path="SymJavaAPI.jar"/>
<resource-root path="uri-template-0.9.jar"/>
<resource-root path="validation-api-1.1.0.Final.jar"/>
<resource-root path="velocity-1.5.jar"/>
<resource-root path="wsdl4j-1.6.3.jar"/>
<resource-root path="xbean-1.0.0.jar"/>
<resource-root path="xercesImpl-2.10.0.jar"/>
<resource-root path="xml-apis-1.4.01.jar"/>
<resource-root path="xml-apis-ext-1.3.04.jar"/>
<resource-root path="xmlschema-core-2.1.0.jar"/>
<resource-root path="xmlsec-1.4.5.jar"/>
</resources>
有人可以告诉我从lib移到模块时有什么问题吗?
最佳答案
您应该评论:<resource-root path="javax.servlet-api-3.1.0.jar"/>
并记住添加:<module name="javaee.api"/>
和<module name="javax.api" export="true"/>
作为module.xml中的依赖项。
关于java - 提供者org.springframework.web.SpringServletContainerInitializer不是子类型,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49029921/