1 2 3 Previous Next 62 Replies Latest reply on May 3, 2012 8:55 AM by steli89

    Arquillian testing with JBoss

    s3ppl

      Hi everyone,

       

      i've tried to put up a simple test-example using arquillian on an already installed jboss-as for quite some time now and read a lot of examples already, but i don't seem to get it somehow. My final target is to get an integration test on an JBoss 4.3 EAP server working, but i'm not sure if this is still supported.

       

      Nevertheless, I tried to get tests working on JBoss 4.2 and JBoss 5.1. I guess the main problem is simply that i unsure which dependendies have to be in the pom.xml to get this started. But i really don't know, what I should try anymore..

       

      I got different test-projects and most of them have nearly the same layout except for the pom.xml, consisting of just a container and a bean, all looking quite like this:

       

      package importing.T1;
      
      import javax.ejb.Stateless;
      
      @Stateless
      public class App implements AppLocal 
      {
          @Override
          public String sayHello() {
              return "Hello";
          }
      }
      

       

      package importing.T1;
      
      import javax.ejb.Local;
      
      @Local
      public interface AppLocal 
      {
          public String sayHello();
      }
      

       

      The according test looks simply like this right now:

       

      package importing.T1;
      
      import static org.junit.Assert.*;
      
      import javax.ejb.EJB;
      
      import org.jboss.arquillian.api.Deployment;
      import org.jboss.arquillian.junit.Arquillian;
      import org.jboss.shrinkwrap.api.ShrinkWrap;
      import org.jboss.shrinkwrap.api.spec.JavaArchive;
      import org.junit.Test;
      import org.junit.runner.RunWith;
      
      @RunWith(Arquillian.class)
      public class AppTest
      {
          
          @EJB
          AppLocal app;
          
          @Deployment
          public static JavaArchive createArchive()
          {
              return ShrinkWrap.create(JavaArchive.class);
          }
          
          @Test
          public void testSayHello()
          {
              assertTrue(true);
          }
      }
      

       

      Since i just have this one project available right now, i can only post that right now, so i'm just putting the other files here.

       

      That's my arquillian.xml, which just holds the path to my jboss-directory

      <arquillian xmlns="http://jboss.org/schema/arquillian"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="
              http://jboss.org/schema/arquillian
              http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
              
          <container qualifier="jbossas-4-managed" default="true">
              <configuration>
                  <property name="jbossHome">Path\to\JBoss</property>
              </configuration>
          </container>
      </arquillian>
      

       

      Here comes my pom.xml

       

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          
          <modelVersion>4.0.0</modelVersion>
      
          <groupId>importing</groupId>
          <artifactId>T1</artifactId>
          <version>0.0.1-SNAPSHOT</version>
          <packaging>jar</packaging>
      
          <name>T1</name>
          <url>http://maven.apache.org</url>
      
          <repositories>
              <repository>
                  <id>jboss.public.repo</id>
                  <url>https://repository.jboss.org/nexus/content/groups/public/</url>
              </repository>
          </repositories>
      
          <dependencyManagement>
              <dependencies>
                  <dependency>
                      <groupId>org.jboss.arquillian</groupId>
                      <artifactId>arquillian-bom</artifactId>
                      <version>1.0.0-SNAPSHOT</version>
                      <scope>import</scope>
                      <type>pom</type>
                  </dependency>
              </dependencies>
          </dependencyManagement>
      
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-compiler-plugin</artifactId>
                      <version>2.3.2</version>
                      <configuration>
                          <source>1.6</source>
                          <target>1.6</target>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      
          <dependencies>
          
              <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <scope>test</scope>
              </dependency>
              
              <dependency>
                  <groupId>org.jboss.arquillian.junit</groupId>
                  <artifactId>arquillian-junit-container</artifactId>
                  <scope>test</scope>
              </dependency>
              
              <dependency>
                  <groupId>org.jboss.spec</groupId>
                  <artifactId>jboss-javaee-6.0</artifactId>
                  <version>1.0.0.Final</version>
                  <type>pom</type>
                  <scope>provided</scope>
              </dependency>
              
              <dependency>
                  <groupId>org.jboss.arquillian.container</groupId>
                  <artifactId>arquillian-jbossas-managed-4.2</artifactId>
                  <version>1.0.0.CR3</version>
                  <scope>test</scope>
              </dependency>
              
          </dependencies>
      
      </project>
      

       

      The error that occurs in this project looks like this (surefire report):

      -------------------------------------------------------------------------------
      Test set: importing.T1.AppTest
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.125 sec <<< FAILURE!
      initializationError(importing.T1.AppTest)  Time elapsed: 0 sec  <<< ERROR!
      java.lang.RuntimeException: Could not create a new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor see cause.
          at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:169)
          at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:40)
          at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:90)
          at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:71)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
          at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:33)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
          at $Proxy0.invoke(Unknown Source)
          at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
          at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
      Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:165)
          ... 25 more
      Caused by: java.lang.RuntimeException: Could not create a new instance of class org.jboss.arquillian.core.impl.ManagerImpl see cause.
          at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:157)
          at org.jboss.arquillian.core.spi.ManagerBuilder.create(ManagerBuilder.java:77)
          at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:55)
          ... 30 more
      Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:153)
          ... 32 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/arquillian/container/spi/client/container/DeployableContainer
          at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASExtension.register(JBossASExtension.java:35)
          at org.jboss.arquillian.core.impl.loadable.LoadableExtensionLoader.load(LoadableExtensionLoader.java:78)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          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:134)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
          at org.jboss.arquillian.core.impl.ManagerImpl.fireProcessing(ManagerImpl.java:315)
          at org.jboss.arquillian.core.impl.ManagerImpl.<init>(ManagerImpl.java:97)
          ... 37 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.arquillian.container.spi.client.container.DeployableContainer
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          ... 50 more
      

       

      I hope someone could explain me, what i'm doing wrong. Another project tells me btw, that the start of the server fails, if i try to do a maven test, using m2e.

       

      Thanks 4 the help

       

      Patrick

        • 1. Re: Arquillian testing with JBoss
          aslak

          Never tested with EAP 4, might work..

           

          Your only problem is using arquillian-bom:1.0.0-SNAPSHOT. Try using 1.0.0.CR7 instead.

           

          (you might run into some issues with the @EJB injection, but add @EJB(mappedName="...jndi location...") and you should  be good to go)

          • 2. Re: Arquillian testing with JBoss
            s3ppl

            Thanks for the reply. I changed the version just as you said and added an jbossas-server-manager to the dependencies. Now i get a similar error as in another of my examples as mentioned before. It says:

             

            -------------------------------------------------------------------------------
            Test set: importing.T1.AppTest
            -------------------------------------------------------------------------------
            Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.972 sec <<< FAILURE!
            importing.T1.AppTest  Time elapsed: 0 sec  <<< ERROR!
            org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not connect to container
                at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:116)
                at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:198)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                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.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221)
                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                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:134)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                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.createSuiteContext(TestContextHandler.java:60)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
                at $Proxy0.invoke(Unknown Source)
                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
            Caused by: java.io.IOException: Server failed to start; see logs. exit code: 1
                at org.jboss.jbossas.servermanager.ServerController.waitForServer(ServerController.java:321)
                at org.jboss.jbossas.servermanager.ServerController.startServer(ServerController.java:140)
                at org.jboss.jbossas.servermanager.ServerManager.startServer(ServerManager.java:163)
                at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:109)
                ... 67 more
            
            

             

            Any suggestions?

            • 3. Re: Arquillian testing with JBoss
              s3ppl

              Ok, i found the problem, causing those start fails. I'm not sure if it depended on the length of the command line or the spaces in my JAVA_HOME path, but after i copied my sdk to sth. like C:\Java\jdk.. and set the JAVA_HOME in the arquillian.xml to the new dir, the server started (still with errors though :-) )

              • 4. Re: Arquillian testing with JBoss
                aslak

                same error? what does the server.log say  ?

                • 5. Re: Arquillian testing with JBoss
                  aslak

                  I added a new feature in CR3 of the JBoss Containers, read the jvm path from the running jvm if it's not set via JAVA_HOME/javaHome. This avoid having to specify it unless you really want it to run with some other JVM. Could you post the 'server start up' command line that is printed in the console. It might have some issues escaping the spaces in the jvm path..

                  • 6. Re: Arquillian testing with JBoss
                    s3ppl

                    C:\Jboss\jdk1.6.0_29\bin\java -cp C:\JBoss\jboss-as\bin\run.jar;C:\Jboss\jdk1.6.0_29\lib\tools.jar -Xmx1024m -XX:MaxPermSize=256m -Djbosstest.udp.ip_ttl=0 -Djava.endorsed.dirs=C:\JBoss\jboss-as\lib\endorsed -Djboss.server.log.threshold=DEBUG -Djboss.boot.server.log.level=DEBUG -Djava.endorsed.dirs=C:\JBoss\jboss-as/lib/endorsed/ -Dxb.builder.useUnorderedSequence=true org.jboss.Main -c default -b localhost -g 1360bfa3086

                     

                    That's the working start up of the server. Before he always called the jvm from C:\Program Files\Java\jdk.. which did not work properly.

                     

                    I don't get the same error as before but i guess the new error has sth. to do with the server itself instead of arq. But here are the surefire-report and the server.log

                     

                    surefire:

                     

                    -------------------------------------------------------------------------------
                    Test set: importing.T1.AppTest
                    -------------------------------------------------------------------------------
                    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 25.613 sec <<< FAILURE!
                    importing.T1.AppTest  Time elapsed: 0 sec  <<< ERROR!
                    org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not connect to container
                        at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:116)
                        at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:198)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                        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.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221)
                        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                        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:134)
                        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                        at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                        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.createSuiteContext(TestContextHandler.java:60)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                        at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
                        at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
                        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
                        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
                        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
                        at $Proxy0.invoke(Unknown Source)
                        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
                        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
                        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
                    Caused by: javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: No deployment manager for uri=jnp://localhost:1099
                        at javax.enterprise.deploy.shared.factories.DeploymentFactoryManager.getDeploymentManager(DeploymentFactoryManager.java:120)
                        at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.createDeploymentManager(JBossASLocalContainer.java:264)
                        at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:112)
                        ... 67 more
                    
                    
                    

                     

                    The server.log is quite long, so i append it as file to this post. I'll also added the threadDump.log hence it is mentioned in the console, if i try to run.

                    • 7. Re: Arquillian testing with JBoss
                      aslak

                      It seems to be missing some classes on the client cp, so it's failing to look them up from the server

                       

                      Do you have both the jboss-server-manager lib:

                      https://github.com/arquillian/arquillian-container-jbossas/blob/master/jbossas-managed-4.2/pom.xml#L68

                       

                      and the jbossall-client lib:

                      https://github.com/arquillian/arquillian-container-jbossas/blob/master/jbossas-managed-4.2/pom.xml#L75

                       

                      ?

                      • 8. Re: Arquillian testing with JBoss
                        s3ppl

                        I didn't have the client, so I added this lib, but the surefire report still shows the same error.

                         

                        Here's my current pom.xml

                         

                        <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
                        
                            <modelVersion>4.0.0</modelVersion>
                        
                            <groupId>importing</groupId>
                            <artifactId>T1</artifactId>
                            <version>0.0.1-SNAPSHOT</version>
                            <packaging>jar</packaging>
                        
                            <name>T1</name>
                            <url>http://maven.apache.org</url>
                        
                            <repositories>
                                <repository>
                                    <id>jboss.public.repo</id>
                                    <url>https://repository.jboss.org/nexus/content/groups/public/</url>
                                </repository>
                            </repositories>
                        
                            <properties>
                                <property name="jboss.home">C:/Jboss/jboss-as/</property>
                            </properties>
                        
                            <dependencyManagement>
                                <dependencies>
                                    <dependency>
                                        <groupId>org.jboss.arquillian</groupId>
                                        <artifactId>arquillian-bom</artifactId>
                                        <version>1.0.0.CR7</version>
                                        <scope>import</scope>
                                        <type>pom</type>
                                    </dependency>
                                </dependencies>
                            </dependencyManagement>
                        
                            <build>
                                <plugins>
                                    <plugin>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-compiler-plugin</artifactId>
                                        <version>2.3.2</version>
                                        <configuration>
                                            <source>1.6</source>
                                            <target>1.6</target>
                        
                                            <additionalClasspathElements>
                                                <additionalClasspathElement>${jboss.home}/client/jboss-ejb3-client.jar</additionalClasspathElement>
                                                <additionalClasspathElement>${jboss.home}/server/default/deploy/jboss-web.deployer/jbossweb.sar</additionalClasspathElement>
                                            </additionalClasspathElements>
                        
                                        </configuration>
                                    </plugin>
                                </plugins>
                            </build>
                        
                            <dependencies>
                        
                                <dependency>
                                    <groupId>dom4j</groupId>
                                    <artifactId>dom4j</artifactId>
                                    <version>1.6.1</version>
                                    <scope>provided</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>junit</groupId>
                                    <artifactId>junit</artifactId>
                                    <version>4.8.1</version>
                                    <scope>test</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>org.jboss.arquillian.junit</groupId>
                                    <artifactId>arquillian-junit-container</artifactId>
                                    <scope>test</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>org.jboss.jbossas</groupId>
                                    <artifactId>jboss-server-manager</artifactId>
                                    <version>1.0.3.GA</version>
                                    <scope>test</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>org.jboss.spec</groupId>
                                    <artifactId>jboss-javaee-6.0</artifactId>
                                    <version>1.0.0.Final</version>
                                    <type>pom</type>
                                    <scope>provided</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>org.jboss.arquillian.container</groupId>
                                    <artifactId>arquillian-jbossas-managed-4.2</artifactId>
                                    <version>1.0.0.CR3</version>
                                    <scope>test</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>org.jboss.client</groupId>
                                    <artifactId>jbossall-client</artifactId>
                                    <version>4.2.1.GA</version>
                                    <scope>provided</scope>
                                </dependency>
                        
                                <dependency>
                                    <groupId>org.jboss.deployers</groupId>
                                    <artifactId>jboss-deployers-client-spi</artifactId>
                                    <version>2.2.0.M2</version>
                                    <scope>test</scope>
                                </dependency>
                        
                            </dependencies>
                        
                        </project>
                        
                        • 9. Re: Arquillian testing with JBoss
                          s3ppl

                          Hi again,

                           

                          thanks to the help (thanks again here 4 the trouble ), some more reading and a bit of trial and error, the server (JBoss 4.3 EAP) starts as he should. Unfortunately the (un?)deployment fails. That's the new surefire-report i get

                           

                          -------------------------------------------------------------------------------
                          Test set: test.testV4_2.AppTest
                          -------------------------------------------------------------------------------
                          Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 21.149 sec <<< FAILURE!
                          testSayHello(test.testV4_2.AppTest)  Time elapsed: 0.021 sec  <<< ERROR!
                          java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
                              at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI(ServletUtil.java:68)
                              at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:58)
                              at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:32)
                              at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.getContainerMethodExecutor(RemoteTestExecuter.java:136)
                              at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:119)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              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:134)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                              at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              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.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
                              at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                              at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
                              at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:260)
                              at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:223)
                              at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:311)
                              at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                              at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:237)
                              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
                              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                              at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
                              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
                              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
                              at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
                              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
                              at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
                              at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:311)
                              at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                              at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:196)
                              at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                              at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:144)
                              at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
                              at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
                              at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
                              at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
                              at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
                          
                          test.testV4_2.AppTest  Time elapsed: 0.145 sec  <<< ERROR!
                          org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not undeploy TestWebProject.war
                              at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.undeploy(JBossASLocalContainer.java:205)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:201)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:181)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:267)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeploy(ContainerDeployController.java:180)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              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.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              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:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$2.perform(ContainerDeployController.java:115)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$2.perform(ContainerDeployController.java:106)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:259)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployedDeployment(ContainerDeployController.java:245)
                              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeployManaged(ContainerDeployController.java:105)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              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:134)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                              at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:108)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              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:75)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                              at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:87)
                              at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:201)
                              at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:311)
                              at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                              at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:196)
                              at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                              at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:144)
                              at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
                              at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
                              at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
                              at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:592)
                              at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
                              at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
                          Caused by: org.jboss.arquillian.container.spi.client.container.DeploymentException: Stop deployment not completed: Operation Stop failed on target org.jboss.deployment.spi.JMXTarget@96212a
                          javax.management.MBeanException
                              at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:180)
                              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
                              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:597)
                              at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:597)
                              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                              at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
                              at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:108)
                              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                              at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:597)
                              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                              at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
                              at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:597)
                              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
                              at sun.rmi.transport.Transport$1.run(Transport.java:159)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
                              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
                              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
                              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
                              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                              at java.lang.Thread.run(Thread.java:662)
                          Caused by: java.io.IOException: deployURL(file:/C:/Users/XXX/AppData/Local/Temp/TestWebProject.war) has not been distributed
                              at org.jboss.deployment.services.DeploymentManagerService.stop(DeploymentManagerService.java:281)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:597)
                              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                              ... 49 more
                          
                              at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.undeploy(JBossASLocalContainer.java:231)
                              at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.undeploy(JBossASLocalContainer.java:201)
                              ... 84 more
                          
                          

                           

                          I already googled those exceptions for a while, but I coudn't find any solution Maybe someone has an idea or two for this.

                           

                          Patrick

                          • 10. Re: Arquillian testing with JBoss
                            aslak

                            Got EAP 4.3 setup here and found a few issues..the problem you see is related to the use of this library:

                             

                            Using this library cause problems for the DeploymentManager, probably due to changes in API from EE4 to EE6.

                             

                            <dependency>
                                <groupId>org.jboss.spec</groupId>
                                <artifactId>jboss-javaee-6.0</artifactId>
                                <version>1.0.0.Final</version>
                                <type>pom</type>
                                <scope>provided</scope>
                            </dependency>
                            

                             

                            That will cause

                             

                            Caused by: javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: No deployment manager for uri=jnp://localhost:1099
                                      at javax.enterprise.deploy.shared.factories.DeploymentFactoryManager.getDeploymentManager(DeploymentFactoryManager.java:120)
                                      at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.createDeploymentManager(JBossASLocalContainer.java:259)
                                      at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:110)
                                      ... 67 more
                            

                             

                             

                            I also registered two new issues, https://issues.jboss.org/browse/ARQ-815 and https://issues.jboss.org/browse/ARQ-816

                            • 11. Re: Arquillian testing with JBoss
                              aslak

                              I've pushed the fixes upstream and pushed a SNAPSHOT live.

                               

                              If you update to use this:

                               

                              <dependency>
                                  <groupId>org.jboss.arquillian.container</groupId>
                                  <artifactId>arquillian-jbossas-managed-4.2</artifactId>
                                  <version>1.0.0.Final-SNAPSHOT</version>
                                  <scope>test</scope>
                              </dependency>
                              

                               

                              Hope that helps!

                              • 12. Re: Arquillian testing with JBoss
                                s3ppl

                                Thanks a lot! I'll try this @work tomorrow. Somehow I don't get the project to work on my private PC anymore, at least not on java 1.5 (bad version in class file) - maybe some different settings I'm not finding at the moment, but I could swear it still worked this morning :\

                                 

                                I'll give you feedback as soon as possible I'll also add my current files then, since they change a little to get the server started, after I tried your snapshot.

                                 

                                Thanks again!

                                 

                                Patrick

                                • 13. Re: Arquillian testing with JBoss
                                  s3ppl

                                  Hi there. Now I'm back at work. Thanks for the fix! It seems to work, since I don't use the javaee-6.0-artifact anymore, 'just' a NPE in my test left, but I hope, I can fix this soon.

                                   

                                  If I add this javaee-6.0-artifact again, the "could not connect to container"-issue from before still remains.

                                   

                                  I you need to see some of my current files reagarding the issue about javaee-6.0, please tell me.

                                   

                                  Patrick

                                  • 14. Re: Arquillian testing with JBoss
                                    s3ppl

                                    I got another question to this topic. It seems like it never actually worked on java 1.5 but on 1.6 only. Is there an easy way to get those dependencies in an 1.5 version like a separate repository or anything?

                                     

                                    Thanks again!

                                     

                                    Patrick

                                    1 2 3 Previous Next