4 Replies Latest reply on Oct 25, 2012 2:55 PM by kelly goedert

    jboss 7.1.1 and arquillian test

    kelly goedert Apprentice

      Hi,

       

      I am trying to follow this guide http://arquillian.org/guides/getting_started/. When I try to use a jboss 7.1.1 installation that I already have to execute the sample tests, I get this error:

       

       

      {code}

      java.lang.NoClassDefFoundError: org/jboss/threads/AsyncFuture

                at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:211)

                at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:173)

                at org.jboss.as.arquillian.container.CommonDeployableContainer.start(CommonDeployableContainer.java:89)

                at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199)

                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: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.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:94)

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

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

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

                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: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:135)

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

                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: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.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:94)

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

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

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

                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)

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

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: java.lang.ClassNotFoundException: org.jboss.threads.AsyncFuture

                at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                ... 64 more

      {code}

       

      My arquillian.xml file looks like this:

       

       

      {code}

      <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-managed" default="true">

              <configuration>

                  <property name="jbossHome">/home/kelly/install/jboss-as-7.1.1.Final</property>

              </configuration>

          </container>

      </arquillian>

      {code}

       

       

      The profile in the pom.xml is this:

       

       

      {code}

      <profile>

                                    <id>arquillian-jbossas-managed</id>

                                    <dependencies>

                                              <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.as</groupId>

                                                        <artifactId>jboss-as-arquillian-container-managed</artifactId>

                                                        <version>7.1.1.Final</version>

                                                        <scope>test</scope>

                                              </dependency>

                                              <dependency>

                                                        <groupId>org.jboss.arquillian.protocol</groupId>

                                                        <artifactId>arquillian-protocol-servlet</artifactId>

                                                        <scope>test</scope>

                                              </dependency>

                                    </dependencies>

                          </profile>

      {code}

       

      The test I am trying to run is the GreeterTest. I am trying to run it inside eclipse.

      Can anybody help?

       

       

      Thanks

       

      Kelly

        • 1. Re: jboss 7.1.1 and arquillian test
          Guillaume Grossetie Newbie

          The org.jboss.threads.AsyncFuture is in the following module : ${jboss.home}/modules/org/jboss/threads/main

          Do you have any custom modules in you AS7 install or custom class loading configuration ?

           

           

          Guillaume.

          • 2. Re: jboss 7.1.1 and arquillian test
            kelly goedert Apprentice

            No. I don't. I just downloaded it from the site. The only thing a did was to add a mysql datasource do the standalone.xml along with the corresponding mysql driver.

             

            I looked for the jar and it is there... could it be cause by some dependency in my project? I have some like seam dependecies, and some other libraries.

             

            Kelly.

            • 3. Re: jboss 7.1.1 and arquillian test
              Karel Piwko Master

              Hi Kelly,

               

              what happens if you remove

               

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

               

              from the pom.xml file?

              • 4. Re: jboss 7.1.1 and arquillian test
                kelly goedert Apprentice

                Hi,

                 

                I removed it, the problem is still there. Here is my full pom.xml (dependencies and profile)... maybe something else is in the way and I am failing to see it

                 

                 

                {code}

                <properties>

                                    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

                                    <jboss-javaee6-spec.version>1.0.0.Final</jboss-javaee6-spec.version>

                                    <seam.version>3.1.0.Final</seam.version>

                          </properties>

                 

                 

                          <profiles>

                                    <profile>

                                              <id>arquillian-jbossas-managed</id>

                                              <dependencies>

                                                        <dependency>

                                                                  <groupId>org.jboss.as</groupId>

                                                                  <artifactId>jboss-as-arquillian-container-managed</artifactId>

                                                                  <version>7.1.1.Final</version>

                                                                  <scope>test</scope>

                                                        </dependency>

                                                        <dependency>

                                                                  <groupId>org.jboss.arquillian.protocol</groupId>

                                                                  <artifactId>arquillian-protocol-servlet</artifactId>

                                                                  <scope>test</scope>

                                                        </dependency>

                                              </dependencies>

                                    </profile>

                          </profiles>

                 

                 

                          <dependencyManagement>

                                    <dependencies>

                                              <dependency>

                                                        <groupId>org.jboss.spec</groupId>

                                                        <artifactId>jboss-javaee-6.0</artifactId>

                                                        <version>3.0.1.Final</version>

                                                        <type>pom</type>

                                                        <scope>import</scope>

                                              </dependency>

                                              <dependency>

                                                        <groupId>org.hibernate</groupId>

                                                        <artifactId>hibernate-entitymanager</artifactId>

                                                        <version>3.6.6.Final</version>

                                                        <scope>provided</scope>

                                                        <exclusions>

                                                                  <exclusion>

                                                                            <groupId>org.slf4j</groupId>

                                                                            <artifactId>slf4j-api</artifactId>

                                                                  </exclusion>

                                                        </exclusions>

                                              </dependency>

                                              <dependency>

                                                        <groupId>org.jboss.seam</groupId>

                                                        <artifactId>seam-bom</artifactId>

                                                        <version>${seam.version}</version>

                                                        <scope>import</scope>

                                                        <type>pom</type>

                                              </dependency>

                                              <dependency>

                                                        <groupId>org.jboss.arquillian</groupId>

                                                        <artifactId>arquillian-bom</artifactId>

                                                        <version>1.0.3.Final</version>

                                                        <scope>import</scope>

                                                        <type>pom</type>

                                              </dependency>

                                    </dependencies>

                          </dependencyManagement>

                 

                 

                          <dependencies>

                                    <dependency>

                                              <groupId>org.hibernate.javax.persistence</groupId>

                                              <artifactId>hibernate-jpa-2.0-api</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.spec.javax.ejb</groupId>

                                              <artifactId>jboss-ejb-api_3.1_spec</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.spec.javax.transaction</groupId>

                                              <artifactId>jboss-transaction-api_1.1_spec</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>javax.enterprise</groupId>

                                              <artifactId>cdi-api</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.spec.javax.annotation</groupId>

                                              <artifactId>jboss-annotations-api_1.1_spec</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.spec.javax.servlet</groupId>

                                              <artifactId>jboss-servlet-api_3.0_spec</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.spec.javax.faces</groupId>

                                              <artifactId>jboss-jsf-api_2.1_spec</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.hibernate</groupId>

                                              <artifactId>hibernate-entitymanager</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.primefaces</groupId>

                                              <artifactId>primefaces</artifactId>

                                              <version>3.4</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.primefaces.themes</groupId>

                                              <artifactId>bootstrap</artifactId>

                                              <version>1.0.8</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.glassfish</groupId>

                                              <artifactId>javax.faces</artifactId>

                                              <version>2.1.10</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>junit</groupId>

                                              <artifactId>junit</artifactId>

                                              <version>4.8.2</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.hamcrest</groupId>

                                              <artifactId>hamcrest-all</artifactId>

                                              <version>1.1</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.mockito</groupId>

                                              <artifactId>mockito-all</artifactId>

                                              <version>1.9.0</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>commons-beanutils</groupId>

                                              <artifactId>commons-beanutils</artifactId>

                                              <version>1.8.3</version>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.seam.faces</groupId>

                                              <artifactId>seam-faces</artifactId>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.seam.faces</groupId>

                                              <artifactId>seam-faces-api</artifactId>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.seam.international</groupId>

                                              <artifactId>seam-international</artifactId>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.spec.javax.el</groupId>

                                              <artifactId>jboss-el-api_2.2_spec</artifactId>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>pmd</groupId>

                                              <artifactId>pmd</artifactId>

                                              <version>4.2.5</version>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>jaxen</groupId>

                                              <artifactId>jaxen</artifactId>

                                              <version>1.1.1</version>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>asm</groupId>

                                              <artifactId>asm</artifactId>

                                              <version>3.1</version>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.seam.security</groupId>

                                              <artifactId>seam-security-api</artifactId>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.seam.security</groupId>

                                              <artifactId>seam-security</artifactId>

                                              <scope>compile</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>commons-codec</groupId>

                                              <artifactId>commons-codec</artifactId>

                                              <version>1.6</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.weld</groupId>

                                              <artifactId>weld-core</artifactId>

                                              <version>1.1.5.Final</version>

                                              <scope>provided</scope>

                                              <exclusions>

                                                        <exclusion>

                                                                  <groupId>org.slf4j</groupId>

                                                                  <artifactId>slf4j-api</artifactId>

                                                        </exclusion>

                                                        <exclusion>

                                                                  <groupId>org.slf4j</groupId>

                                                                  <artifactId>slf4j-ext</artifactId>

                                                        </exclusion>

                                              </exclusions>

                                    </dependency>

                                    <dependency>

                                              <groupId>joda-time</groupId>

                                              <artifactId>joda-time</artifactId>

                                              <version>2.1</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>joda-time</groupId>

                                              <artifactId>joda-time-hibernate</artifactId>

                                              <version>1.3</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>com.google.guava</groupId>

                                              <artifactId>guava</artifactId>

                                              <version>11.0.2</version>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.unitils</groupId>

                                              <artifactId>unitils-dbunit</artifactId>

                                              <version>3.3</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>mysql</groupId>

                                              <artifactId>mysql-connector-java</artifactId>

                                              <version>5.1.7</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.jbossas</groupId>

                                              <artifactId>jboss-as-client</artifactId>

                                              <type>pom</type>

                                              <version>6.1.0.Final</version>

                                              <scope>provided</scope>

                                              <exclusions>

                                                        <exclusion>

                                                                  <groupId>org.jboss.logging</groupId>

                                                                  <artifactId>jboss-logging</artifactId>

                                                        </exclusion>

                                                        <exclusion>

                                                                  <groupId>javax.validation</groupId>

                                                                  <artifactId>validation-api</artifactId>

                                                        </exclusion>

                                                        <exclusion>

                                                                  <groupId>com.sun.istack</groupId>

                                                                  <artifactId>istack-commons-runtime</artifactId>

                                                        </exclusion>

                                              </exclusions>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.hibernate</groupId>

                                              <artifactId>hibernate-validator</artifactId>

                                              <version>4.1.0.Final</version>

                                              <type>jar</type>

                                              <scope>provided</scope>

                                              <exclusions>

                                                        <exclusion>

                                                                  <groupId>org.slf4j</groupId>

                                                                  <artifactId>slf4j-api</artifactId>

                                                        </exclusion>

                                              </exclusions>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.slf4j</groupId>

                                              <artifactId>slf4j-api</artifactId>

                                              <version>1.5.6</version>

                                              <scope>provided</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.slf4j</groupId>

                                              <artifactId>slf4j-simple</artifactId>

                                              <version>1.6.4</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.weld</groupId>

                                              <artifactId>weld-core</artifactId>

                                              <version>1.1.5.Final</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.slf4j</groupId>

                                              <artifactId>slf4j-simple</artifactId>

                                              <version>1.6.4</version>

                                              <scope>test</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.jboss.arquillian.junit</groupId>

                                              <artifactId>arquillian-junit-container</artifactId>

                                              <scope>test</scope>

                                    </dependency>

                          </dependencies>

                 

                {code}