【问题标题】:jboss-deployment-structure.xml does not load to Wildfly 10.xjboss-deployment-structure.xml 不会加载到 Wildfly 10.x
【发布时间】:2018-10-26 07:14:51
【问题描述】:

我正在使用带有 Java 8 的 Wildfly 10。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.

【问题讨论】:

    标签: jboss cxf wildfly


    【解决方案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下

    【讨论】:

    【解决方案2】:

    您是在部署 ear(包含“my.war”)还是独立的 war? 因为您使用的是&lt;sub-deployment&gt; 而不是&lt;deployment&gt;...

    我会这样做(这里仅限于 REST Web 服务)

        <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
          <deployment>
            <exclude-subsystems>
                <subsystem name="jaxrs" />
            </exclude-subsystems>
            ...
    

    【讨论】:

    • 我正在部署一个独立的战争。我也试过 ,但还是不行:(
    猜你喜欢
    • 2020-12-01
    • 2013-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-17
    • 1970-01-01
    • 2015-08-01
    • 2016-08-22
    相关资源
    最近更新 更多