11

I try to run integration test with Arquillian and Wildfly.

My dependencies in Maven look as follows:

<dependency>
  <groupId>org.jboss.arquillian</groupId>
  <artifactId>arquillian-bom</artifactId>
  <version>1.1.2.Final-wildfly-1</version>
  <type>pom</type>
  <scope>import</scope>
</dependency>
<dependency>
  <groupId>org.jboss.arquillian.junit</groupId>
  <artifactId>arquillian-junit-container</artifactId>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.wildfly</groupId>
  <artifactId>wildfly-arquillian-container-embedded</artifactId>
  <version>8.0.0.Final</version>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.wildfly</groupId>
  <artifactId>wildfly-embedded</artifactId>
  <version>8.0.0.Final</version>
</dependency>

Is it necessary to include both the wildfly-arquillian-container-embedded and wildfly-embedded?

When running the test, I get the following error:

[main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
Cannot not load JBoss LogManager. The LogManager has likely been accessed prior to this initialization.
[main] INFO  org.jboss.msc - JBoss MSC version 1.2.0.Final
Feb 18, 2014 11:34:08 AM org.jboss.as.server.ApplicationServerService start
INFO: JBAS015899: WildFly 8.0.0.Final "WildFly" starting
Feb 18, 2014 11:34:13 AM org.jboss.as.controller.AbstractOperationContext executeStep
ERROR: JBAS014612: Operation ("parallel-extension-add") failed - address: ([])
java.lang.RuntimeException: JBAS014670: Failed initializing module org.jboss.as.logging
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:99)
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:591)
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:469)
at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:273)
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:268)
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:314)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:294)
at org.jboss.as.server.ServerService.boot(ServerService.java:356)
at org.jboss.as.server.ServerService.boot(ServerService.java:331)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException:
JBAS011592: The logging subsystem requires the log manager to be
org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be
used.
To use JBoss Log Manager you must add the system property "java.util.logging.manager"
and set it to "org.jboss.logmanager.LogManager"
рüффп
  • 5,172
  • 34
  • 67
  • 113
user3318442
  • 163
  • 2
  • 10

2 Answers2

4

I added the following to the plugins section in my pom.xml:

  <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>
  </plugin>

Made the complaints go away. I'm not sure if it is a bug or not. I think it would be better if the embedded container just worked without any extra configuration.

Stefan Arentz
  • 34,311
  • 8
  • 67
  • 88
0

add this it will work i had he same problem (in pom.xml) with right version :

    <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>3.3.0.Final</version>
    </dependency>
cyril
  • 872
  • 6
  • 29