jboss-deployment-struct.xml 未加载到 Wildfly 10.x

标签 jboss cxf wildfly

我正在使用 Wildfly 10 和 Java 8。WEB-INF/jboss-deployment-struct.xml 如下,我还尝试将 jboss-deployment-struct.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.

最佳答案

尝试一下:

<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下

关于jboss-deployment-struct.xml 未加载到 Wildfly 10.x,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53003394/

相关文章:

java - 在 JBoss Weld 中的持久性单元服务之前启动服务

java - 请求/响应对象

apache - WSDL2Java。 Apache CXF。 ArrayOf {Type}列出<Type>

java - 是否可以在多个阶段注册 CXF 拦截器?

logging - 如何配置 WildFly 8.2.0 日志记录以仅显示调试级别的应用程序

jakarta-ee - Swagger 2.x JaxrsAnnotationScanner 找不到位于 ear 中的资源类

java - Keycloak - 无法启动嵌入式服务器 : WFLYEMB0022: Cannot invoke 'start' on embedded process: Parameter 'abstractPath' must not be empty

java - 在 JBos 的 servlet 中使用 TCP 套接字

java - WFLYEJB0029 : Could not restore timer from . .. com.ctc.wstx.exc.WstxEOFException:序言中出现意外的 EOF

javascript - AngularJS/NodeJS/RESTEasy+JBoss/LDAP 堆栈的身份验证机制