8 Replies Latest reply on Jan 18, 2016 2:10 PM by psanket.smart

    Wildfly 9 and Arquillian Maven dependencies problem

    javapapo

      Hello to everyone, we have switched to Wildfly 9, we have been doing testing using arquillian and we would like to continue to do so. It seems that I am bit confused though (or there is some bug/error)  with the deps on the container adapter.

       

      WHAT IT WORKS, the config below, is using the 'old' wildfly-arquillian-container-embedded , with version 8.2.0 (we used to have 8.2.0), but now we use a Wildfly 9.0.0. Final, the one eventually set by the sure fire plugin.


       

      <dependency>
         <groupId>org.jboss.arquillian</groupId>
         <artifactId>arquillian-bom</artifactId>
         <version>1.1.8.Final</version>
         <scope>import</scope>
         <type>pom</type>
      </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.2.0.Final</version>
         <scope>test</scope>
      </dependency>
      
      <dependency>
         <groupId>org.wildfly</groupId>
         <artifactId>wildfly-embedded</artifactId>
         <scope>test</scope>
           <version>9.0.0.Final</version
      
      </dependency>
      
      
      ---------------------------------
      <!--wildfly version 9.0.0.Final  -->
      
      plugins>
         <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
         <!-- Fork every test because it will launch a separate AS instance -->
         <forkMode>always</forkMode>
         <systemPropertyVariables>
         <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
         <jboss.home>${project.basedir}/../server/wildfly-${wildfly.version}</jboss.home>
         <module.path>${project.basedir}/../server/wildfly-${wildfly.version}/modules</module.path>
         </systemPropertyVariables>
         <redirectTestOutputToFile>false</redirectTestOutputToFile>
         <argLine>-Xms1024m -Xmx2048m -XX:MaxPermSize=512m</argLine>
         </configuration>
      </plugin>
      
      
      

       

      Eventually though it seems to be a new dependency and group.id for doing the same thing using wildfly 9.0.0. this one


      http://search.maven.org/#artifactdetails|org.wildfly.arquillian|wildfly-arquillian-container-embedded|1.0.0.Final|jar


      When I use the above dependency and remove the org.wildflly: wildfly-arquillian-container-embedded,:8.2.0.Final all my tests fail with the following exceptions.


      I have also tried chameleon (but I am not sure it worked for me).



      So the question is , what is the appropriate wiring of maven deps for Wildfly 9.0.Final emb testing with arquillian?

      CapturFiles.png


        • 1. Re: Wildfly 9 and Arquillian Maven dependencies problem
          jamezp

          Could you try adding the following to your pom?

          
          
          <dependency>
              <groupId>org.wildfly.arquillian</groupId>
              <artifactId>wildfly-arquillian-protocol-jmx</artifactId>
              <scope>test</scope>
          </dependency>
          

           

           

          --

          James R. Perkins

          • 2. Re: Wildfly 9 and Arquillian Maven dependencies problem
            javapapo

            Unfortunately it does not work still, the tests fail (or halt).

             

            Exception in thread "Remoting "endpoint" task-4" java.lang.NoSuchMethodError: org.jboss.logging.Logger.tracef(Ljava/lang/String;I)V

                at org.jboss.remotingjmx.VersionedConectionFactory$ClientVersionReceiver.handleMessage(VersionedConectionFactory.java:158)

                at org.jboss.remoting3.remote.RemoteConnectionChannel$4.run(RemoteConnectionChannel.java:386)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                at java.lang.Thread.run(Thread.java:745)

             

             

            java.lang.RuntimeException: java.io.IOException: Timeout out waiting for header, status=WAITING

                at org.jboss.as.arquillian.container.ManagementClient.getConnection(ManagementClient.java:361)

                at org.jboss.as.arquillian.container.ManagementClient.getProtocolMetaData(ManagementClient.java:173)

                at org.jboss.as.arquillian.container.CommonDeployableContainer.deploy(CommonDeployableContainer.java:147)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)

                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)

                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)

                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)

                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:87)

                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:201)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)

                at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)

                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

                at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)

                at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)

                at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

            Caused by: java.io.IOException: Timeout out waiting for header, status=WAITING

                at org.jboss.remotingjmx.VersionedConectionFactory.createVersionedConnection(VersionedConectionFactory.java:77)

                at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:183)

                at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:105)

                at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)

                at org.jboss.as.arquillian.container.ManagementClient.getConnection(ManagementClient.java:358)

                ... 92 more

            • 3. Re: Wildfly 9 and Arquillian Maven dependencies problem
              jamezp

              That looks really strange. Like a really old version of jboss-logging is being found on the class path. Try a mvn dependency:tree -Dincludes=org.jboss.logging to see what version of logging is being used.

               

              --

              James R. Perkins

              • 4. Re: Wildfly 9 and Arquillian Maven dependencies problem
                javapapo
                [INFO] com.nexusgroup:vortex-web:war:0.2.0-SNAPSHOT
                [INFO] \- org.infinispan:infinispan-core:jar:7.2.3.Final:provided
                [INFO]    \- org.jboss.logging:jboss-logging:jar:3.1.4.GA:provided
                
                • 5. Re: Wildfly 9 and Arquillian Maven dependencies problem
                  jamezp

                  Hmm... ...that version should work, but maybe try excluding it in your pom.

                   

                  --

                  James R. Perkins

                  • 6. Re: Wildfly 9 and Arquillian Maven dependencies problem
                    jamezp

                    FYI I just released wildfly-arquillian 1.0.1.Final. That should fix the embedded problem. The other issue with logging you might need to exclude that from the org.infinispan:infinispan-core dependency definition.

                     

                    --

                    James R. Perkins

                    • 7. Re: Wildfly 9 and Arquillian Maven dependencies problem
                      javapapo

                      Hello James, many thanks for your reply and the release. Eventually it works. I will need to re-check regarding infinispan transitive dependencies. My latest setup is the following       

                       

                      <dependency>
                         <groupId>org.wildfly.arquillian</groupId>
                         <artifactId>wildfly-arquillian-container-embedded</artifactId>
                         <version>1.0.1.Final</version>
                      </dependency>
                      
                      
                      <!-- this is the wildfly emb.container - BUT eventually it is not a fully blown emb.container-->
                      <dependency>
                         <groupId>org.wildfly</groupId>
                         <artifactId>wildfly-embedded</artifactId>
                         <version>${wildfly.version}</version>
                      </dependency>
                      
                      • 8. Re: Wildfly 9 and Arquillian Maven dependencies problem
                        psanket.smart

                        Hey i am really new to this and tring to configure Arquillian with java 7 or java 8 would be perfect.

                        Can you help me by providing your pom file so that i could look at configruation.

                         

                        I configured a pom for glassfish and java 6 but now i want to do it with wild fly.

                        Please Help

                         

                        Thank You!!