Arquillian和wildfly 10 - 无法取消部署:144976d2-382b-438f-8b8a-2007db7b53c2.war

时间:2016-09-06 21:05:50

标签: java maven jboss

我正在使用Wildfly 10和Arquilliain从MVN运行集成测试。我收到以下错误:

  

WARN ArchiveDeployer - 无法取消部署:   144976d2-382b-438F-8b8a-2007db7b53c2.war   org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper $ ServerDeploymentException:   java.lang.Exception:" WFLYCTL0216:管理资源   ' [(\"部署\" => \" 144976d2-382b-438f-8b8a-2007db7b53c2.war \")]'   找不到"在   org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:114)     在   org.jboss.as.arquillian.container.ArchiveDeployer.undeploy(ArchiveDeployer.java:55)     在   org.jboss.as.arquillian.container.CommonDeployableContainer.undeploy(CommonDeployableContainer.java:152)     在   org.jboss.arquillian.container.impl.client.container.ContainerDeployController $ 4.call(ContainerDeployController.java:205)     在   org.jboss.arquillian.container.impl.client.container.ContainerDeployController $ 4.call(ContainerDeployController.java:185)     在   org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

这是我的Arquillian(与另一个有效的项目相同,所以我不认为这是问题,所有端口都是正确的):

<?xml version="1.0" ?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="http://jboss.org/schema/arquillian"
            xsi:schemaLocation="http://jboss.org/schema/arquillian
  http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
    <engine>
        <property name="deploymentExportPath">target</property>
    </engine>
<!--
    <container qualifier="wildfly-managed" default="true">
        <configuration>
            &lt;!&ndash;            <property name="serverConfig">standalone.xml</property> Does not work, use -DjbossHome=.....&ndash;&gt;
            <property name="outputToConsole">true</property>

            <property name="javaVmArguments">-Djboss.socket.binding.port-offset=100</property>
            <property name="managementPort">10090</property>
        </configuration>
    </container>
-->
    <container qualifier="wildfly-remote" default="true">
        <protocol type="Servlet 3.0">
            <property name="host">192.168.3.70</property>
            <property name="port">8180</property>
        </protocol>
        <configuration>
            <property name="managementPort">10090</property>
            <property name="username">mike</property>
            <property name="password">mike</property>
            <property name="managementAddress">192.168.3.70</property>
        </configuration>
    </container>

    <extension qualifier="transaction">
        <property name="manager">java:jboss/UserTransaction</property>
    </extension>

</arquillian>

我的部署是这样构建的:

@Deployment
  public static WebArchive createDeployment() {
    WebArchive wa = ShrinkWrap.create(WebArchive.class).addPackage(Baby.class.getPackage())
        .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
        .addAsManifestResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
        .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
        .addAsResource("arquillian.xml", "arquillian.xml").addAsResource("log4j.xml", "log4j.xml")
        .addAsLibrary(Maven.resolver().loadPomFromFile("pom.xml").resolve("joda-time:joda-time:2.9.3")
            .withTransitivity().asSingleFile())
        .addAsLibraries((Maven.resolver().loadPomFromFile("pom.xml")
            .resolve("com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:2.7.4").withTransitivity()
            .asFile()));

该应用程序运行正常,如果我在本地WF安装上将其作为托管容器启动它可以工作。由于某种原因,远程容器失败。

有什么想法吗?

编辑:

我还将此添加到web.xml,但它没有改变问题:

<context-param>
    <param-name>antiJARLocking</param-name>
    <param-value>true</param-value>
</context-param>
<context-param>
    <param-name>antiResourceLocking</param-name>
    <param-value>true</param-value>
</context-param>

0 个答案:

没有答案