我正在使用Java 8的Wildfly10。WEB-INF / jboss-deployment-structure.xml如下,我还尝试将jboss-deployment-structure.xml放在META-INF下。 我想将JBoss AS用作没有WS功能的servlet容器,因此我尝试关闭webservices子系统。
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sub-deployment name="my.war">
<exclude-subsystems>
<subsystem name="webservices" />
</exclude-subsystems>
</sub-deployment>
</jboss-deployment-structure>
但是我仍然收到以下错误。我认为xml无法加载。
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYWS0059: Apache CXF library (cxf-2.6.2.jar) detected in ws endpoint deployment; either provide a proper deployment replacing embedded libraries with container module dependencies or disable the webservices subsystem for the current deployment adding a proper jboss-deployment-structure.xml descriptor to it. The former approach is recommended, as the latter approach causes most of the webservices Java EE and any JBossWS specific functionality to be disabled.
答案 0 :(得分:1)
您要部署 ear (包含“ my.war”)还是独立的 war ?
因为您使用的是<sub-deployment>
,而不是<deployment>
...
我会这样做(这里仅限于REST Web服务)
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="jaxrs" />
</exclude-subsystems>
...
答案 1 :(得分:1)
尝试一下:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="webservices"/>
<subsystem name="jaxrs"/>
</exclude-subsystems>
<exclusions>
<module name="javax.ws.rs.api"/>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
</exclusions>
</deployment>
</jboss-deployment-structure>
PS:正确的位置在WEB-INF下