1 Reply Latest reply on Mar 30, 2013 4:51 AM by Aslak Knutsen

    ClassNotFoundException: org.jboss.arquillian.core.spi.ManagerBuilder

    rkandru Newbie

      Hi, I am trying Aruillian for the integration testing. I have added all the dependencies as recommended. When I run it as a junit test, I get the following exceptions.

      java.lang.NoClassDefFoundError: org/jboss/arquillian/core/spi/ManagerBuilder

          at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:49)

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

          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.arquillian.core.spi.ManagerBuilder

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

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

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

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

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

       

      My pom.xml is as follows:

      <repositories>

              <repository>

                  <id>jboss</id>

                  <url>http://repository.jboss.org/maven2/</url>

              </repository>

          </repositories>

       

          <build>

              <plugins>

                  <plugin>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <version>2.3.2</version>

                      <configuration>

                          <source>1.6</source>

                          <target>1.6</target>

                      </configuration>

                  </plugin>

                  <plugin>

                      <artifactId>maven-war-plugin</artifactId>

                      <version>2.3</version>

                      <configuration>

                          <archive>

                              <manifest>

                                  <addDefaultImplementationEntries>true</addDefaultImplementationEntries>

                                  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>

                              </manifest>

                          </archive>

                          <archiveClasses>true</archiveClasses>

                      </configuration>

                  </plugin>

                  <plugin>

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

                      <artifactId>arquillian-maven-plugin</artifactId>

                      <version>1.0.0-SNAPSHOT</version>

                  </plugin>

              </plugins>

          </build>

       

       

          <dependencyManagement>

              <dependencies>

                  <dependency>

                      <groupId>org.jboss.shrinkwrap.resolver</groupId>

                      <artifactId>shrinkwrap-resolver-bom</artifactId>

                      <version>2.0.0-alpha-5</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>

                  <dependency>

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

                      <artifactId>arquillian-build</artifactId>

                      <version>1.0.1.Final</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

       

              </dependencies>

          </dependencyManagement>

          <dependencies>

              <dependency>

                  <groupId>com.netflix.curator</groupId>

                  <artifactId>curator-framework</artifactId>

                  <version>1.3.2</version>

              </dependency>

              <dependency>

                  <groupId>com.netflix.curator</groupId>

                  <artifactId>curator-recipes</artifactId>

                  <version>1.3.2</version>

              </dependency>

              <dependency>

                  <groupId>com.oracle</groupId>

                  <artifactId>ojdbc6</artifactId>

                  <version>11.2.0.3</version>

              </dependency>

              <!-- <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId>

                  <version>6.0</version> <scope>provided</scope> </dependency> -->

              <dependency>

                  <groupId>javax.annotation</groupId>

                  <artifactId>jsr250-api</artifactId>

                  <version>1.0</version>

                  <scope>provided</scope>

              </dependency>

              <dependency>

                  <groupId>javax.enterprise</groupId>

                  <artifactId>cdi-api</artifactId>

                  <version>1.1-20120918</version>

                  <scope>provided</scope>

              </dependency>

              <dependency>

                  <groupId>javax.inject</groupId>

                  <artifactId>javax.inject</artifactId>

                  <version>1</version>

                  <scope>provided</scope>

              </dependency>

              <dependency>

                  <groupId>log4j</groupId>

                  <artifactId>log4j</artifactId>

                  <version>1.2.15</version>

              </dependency>

              <dependency>

                  <groupId>org.hibernate</groupId>

                  <artifactId>hibernate-entitymanager</artifactId>

                  <version>4.1.10.Final</version>

              </dependency>

              <dependency>

                  <groupId>org.hibernate</groupId>

                  <artifactId>hibernate-validator</artifactId>

                  <version>4.3.0.Final</version>

              </dependency>

              <dependency>

                  <groupId>org.jboss.resteasy</groupId>

                  <artifactId>resteasy-jaxrs</artifactId>

                  <version>2.3.5.Final</version>

                  <scope>provided</scope>

              </dependency>

              <dependency>

                  <groupId>org.scannotation</groupId>

                  <artifactId>scannotation</artifactId>

                  <version>1.0.2</version>

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

                  <version>1.0.3.Final</version>

              </dependency>

             

      </dependencies>

      <profiles>

              <profile>

                  <id>jetty</id>

                  <dependencies>

                      <dependency>

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

                          <artifactId>arquillian-jetty-embedded-7</artifactId>

                          <version>1.0.0.CR1</version>

                      </dependency>

                      <dependency>

                          <groupId>org.eclipse.jetty</groupId>

                          <artifactId>jetty-webapp</artifactId>

                          <version>8.0.0.M3</version>

                      </dependency>

                      <dependency>

                          <groupId>org.eclipse.jetty</groupId>

                          <artifactId>jetty-plus</artifactId>

                          <version>8.0.0.M3</version>

                      </dependency>

                  </dependencies>

              </profile>

      </profiles>

       

      I am a newbie and not sure why arquillian jars are not getting added to classpath. Appreciate any help on this. Thanks.