Arquillian wildfly8.2 embedded : JBAS014670: Failed initializing module org.jboss.as.logging

二次信任 提交于 2019-12-06 06:29:55
Vandeperre Maarten

For some reason, the maven to eclipse settings are not completely working: in eclipse: go to JVM settings of the unit test(s) you want to run,

Right click on unit test file -->Run As -->Run Configuration -->JUnit -->Arguments

and add the below line in VM arguments section

-Djava.util.logging.manager=org.jboss.logmanager.LogManager

Adding this snippet in pom.xml solved the issue.

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
    <systemProperties>
        <property>
            <name>java.util.logging.manager</name>
            <value>org.jboss.logmanager.LogManager</value>
        </property>
    </systemProperties>
</configuration>

In my case it helped to disable a java agent as mentioned in https://issues.jboss.org/browse/WFLY-3152:

There is nothing we can really do about this. As Rob said this is generally caused by a javaagent that uses java.util.logging before the server has started. It can also be caused by running the server in embedded mode and having code that uses java.util.logging before the server starts.

Ie. removal of java property: JAVA_OPTS="$JAVA_OPTS -agentpath:...

In addition to the answer of Abhishek: For integration tests you must add this snippet too:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-failsafe-plugin</artifactId>
  <configuration>
    <systemProperties>
      <property>
        <name>java.util.logging.manager</name>
        <value>org.jboss.logmanager.LogManager</value>
      </property>
    </systemProperties>
  </configuration>
</plugin>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!