12 Replies Latest reply on Feb 1, 2012 5:56 AM by kelly goedert

    Arquillian tests in eclipse log error

    kelly goedert Apprentice

      Hi,

       

      I am successfully running the temperature converter example with maven on the command line. I am using eclipse indigo. But trying to run the same test using the profile with maven inside eclipse, gives me this error:

       

      java.lang.NoSuchMethodError: org.jboss.logging.Logger.getLoggerPlugin()Lorg/jboss/logging/LoggerPlugin;

                at org.jboss.aop.util.logging.AOPLogger.<init>(AOPLogger.java:63)

                at org.jboss.aop.util.logging.AOPLogger.getLogger(AOPLogger.java:44)

                at org.jboss.aop.AspectManager.<clinit>(AspectManager.java:109)

                at org.jboss.aop.proxy.ProxyFactory.createProxyCtClass(ProxyFactory.java:148)

                at org.jboss.aop.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:117)

                at org.jboss.aop.proxy.ProxyFactory.createInterfaceProxy(ProxyFactory.java:94)

                at org.jboss.aop.proxy.MarshalledInterfaceProxy.readResolve(MarshalledInterfaceProxy.java:72)

                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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)

                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1761)

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

                at java.rmi.MarshalledObject.get(MarshalledObject.java:142)

                at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)

                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:771)

                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

                at javax.naming.InitialContext.lookup(InitialContext.java:392)

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.initDeploymentManager(JBossASRemoteContainer.java:204)

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.start(JBossASRemoteContainer.java:87)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:144)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:134)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:182)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:133)

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

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:76)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:175)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainers(ContainerLifecycleController.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: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:83)

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

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

                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)

       

       

      My pom.xml is as follows:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <project

                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"

                xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                <modelVersion>4.0.0</modelVersion>

                <groupId>com.forge.example</groupId>

                <artifactId>forgetest2</artifactId>

                <version>1.0.0-SNAPSHOT</version>

                <packaging>war</packaging>

       

                <properties>

                          <arquillian.version>1.0.0.CR1</arquillian.version>

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

                </properties>

       

       

                <profiles>

                          <profile>

                                    <id>jbossas-remote-6</id>

                                    <dependencies>

                                              <dependency>

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

                                                        <artifactId>arquillian-jbossas-remote-6</artifactId>

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

                                              </dependency>

                                              <dependency>

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

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

                                                        <version>6.1.0.Final</version>

                                                        <type>pom</type>

                                              </dependency>

                                    </dependencies>

                          </profile>

       

                </profiles>

       

                <dependencyManagement>

                          <dependencies>

                                    <dependency>

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

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

                                              <version>2.0.0.Final</version>

                                              <type>pom</type>

                                              <scope>import</scope>

                                    </dependency>

                                    <dependency>

                                              <groupId>org.hibernate</groupId>

                                              <artifactId>hibernate-entitymanager</artifactId>

                                              <version>4.0.1.Final</version>

                                              <scope>provided</scope>

                                    </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.0_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.0</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.glassfish</groupId>

                                    <artifactId>javax.faces</artifactId>

                                    <version>2.1.6</version>

                          </dependency>

                          <dependency>

                                    <groupId>junit</groupId>

                                    <artifactId>junit</artifactId>

                                    <version>4.8.2</version>

                                    <scope>test</scope>

                          </dependency>

                          <dependency>

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

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

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

                                    <scope>test</scope>

                          </dependency>

                </dependencies>

       

                <repositories>

                          <repository>

                                    <id>JBOSS_NEXUS</id>

                                    <url>http://repository.jboss.org/nexus/content/groups/public</url>

                          </repository>

                          <repository>

                  <id>maven-nuxeo</id>

                  <name>Maven Nuxeo Repository</name>

                  <url>https://maven.nuxeo.org/nexus/content/groups/public/</url>

                  <layout>default</layout>

                  <releases>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </releases>

                  <snapshots>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </snapshots>

              </repository>

                          <repository>

                                    <id>Prime Technology Maven Repository</id>

                                    <url>http://repository.primefaces.org</url>

                          </repository>

                </repositories>

                <build>

                          <finalName>forgetest2</finalName>

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

                                              <extensions>false</extensions>

                                              <configuration>

                                                        <failOnMissingWebXml>false</failOnMissingWebXml>

                                              </configuration>

                                    </plugin>

                          </plugins>

                </build>

      </project>

       

      Can somebody help?

       

      Thanks in advance

       

      Kelly

        • 1. Re: Arquillian tests in eclipse log error
          Bartosz Majsak Master

          I believe it's not related to the problem as such but I would suggest to use Arquillian Core CR 7 and arquillian-jbossas-remote-6 1.0.0.CR2 (core and extensions/containers have their own versioning). Also please use maven surefire version > 2.8 (preferably 2.11).

           

          I assume that you are using embedded maven in Eclipse (which is 3.x), but which version are you using for the command line?

           

          Cheers,

          Bartosz

          • 2. Re: Arquillian tests in eclipse log error
            kelly goedert Apprentice

            Maybe I am missing a repository because I cant find

            Arquillian Core CR 7 and arquillian-jbossas-remote-6 1.0.0.CR2 as you suggested.

             

            About the maven version in eclipse you are right, and in the command line I just saw that I am using maven 2.x

             

            Should I be using 2 or 3?

            • 3. Re: Arquillian tests in eclipse log error
              Bartosz Majsak Master

              Since couple of months Arquillian artifacts are also available in Maven Central, so repository should not be a problem in this case.

               

              I would suggest to add Arquillian BOM to your dependecy mgmt, as follows:

               

              {code:xml}<dependencyManagement>

                  <dependencies>

                    <dependency>

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

                      <artifactId>arquillian-bom</artifactId>

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

                      <type>pom</type>

                      <scope>import</scope>

                    </dependency>

                  </dependencies>

              </dependencyManagement>

              {code}

               

              Where ${version.arquillian_core} is 1.0.0.CR7

               

              Then you don't need to specify version types for any of the core dependencies such as arquillian-junit-container

               

               

              {code:xml}<profile>

                   <id>jbossas-remote-6</id>

                        <dependencies>

                             <dependency>

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

                                  <artifactId>arquillian-jbossas-remote-6</artifactId>

                                  <version>1.0.0.CR2</version>

                             </dependency>

                             <dependency>

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

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

                                  <version>6.0.0.Final</version>

                                  <type>pom</type>

                             </dependency>

                        </dependencies>

                   </profile>

              {code}

               

               

              Or  6.1.0.Final if  6.0.0.Final won't work for jboss-as-client  (I haven't tried this particular version of JBoss AS yet)

               

              To be honest I never used embedded maven in eclipse for running tests (only for resolving deps), but I'm using 3.0.3 from the command line and it works nicely with Arquillian. But there is definitely some kind of classpath conflict in this case. However, from the stacktrace it looks to me that you are using JUnit runner for Eclipse, not really a surefire maven test runner. Do you have some JBoss-specifiec libraries (or AS connector) added to your Eclipse project?

               


              • 4. Re: Arquillian tests in eclipse log error
                kelly goedert Apprentice

                Well,

                 

                yes I am using eclipse junit test runner. I am also using jboss tools, if there is some dependency that is jboss specific it was added by the plugin. But I couldn't find any. I update my pom using your suggestions and now it looks like this:

                {code:xml}

                <?xml version="1.0" encoding="UTF-8"?>

                <project

                     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"

                     xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                     <modelVersion>4.0.0</modelVersion>

                     <groupId>com.forge.example</groupId>

                     <artifactId>forgetest2</artifactId>

                     <version>1.0.0-SNAPSHOT</version>

                     <packaging>war</packaging>

                 

                 

                     <properties>

                          <!-- arquillian.version>1.0.0.CR1</arquillian.version -->

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

                     </properties>

                 

                 

                     <profiles>

                          <profile>

                               <id>jbossas-remote-6</id>

                               <dependencies>

                               <dependency>

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

                                    <artifactId>arquillian-jbossas-remote-6</artifactId>

                                    <version>1.0.0.CR2</version>

                               </dependency>

                               <dependency>

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

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

                                    <version>6.1.0.Final</version>

                                    <type>pom</type>

                               </dependency>

                          </dependencies>

                          </profile>

                     </profiles>

                 

                 

                     <dependencyManagement>

                          <dependencies>

                               <dependency>

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

                                    <artifactId>arquillian-bom</artifactId>

                                    <version>1.0.0.CR7</version>

                                    <type>pom</type>

                                    <scope>import</scope>

                               </dependency>

                               <dependency>

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

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

                                    <version>2.0.0.Final</version>

                                    <type>pom</type>

                                    <scope>import</scope>

                               </dependency>

                               <dependency>

                                    <groupId>org.hibernate</groupId>

                                    <artifactId>hibernate-entitymanager</artifactId>

                                    <version>4.0.1.Final</version>

                                    <scope>provided</scope>

                               </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.0_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.0</version>

                          </dependency>

                          <dependency>

                               <groupId>org.glassfish</groupId>

                               <artifactId>javax.faces</artifactId>

                               <version>2.1.6</version>

                          </dependency>

                          <dependency>

                               <groupId>junit</groupId>

                               <artifactId>junit</artifactId>

                               <version>4.8.2</version>

                               <scope>test</scope>

                          </dependency>

                          <!-- dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId>

                               <version>${arquillian.version}</version> <scope>test</scope> </dependency -->

                     </dependencies>

                 

                 

                     <repositories>

                          <repository>

                               <id>JBOSS_NEXUS</id>

                               <url>http://repository.jboss.org/nexus/content/groups/public</url>

                          </repository>

                          <repository>

                               <id>maven-nuxeo</id>

                               <name>Maven Nuxeo Repository</name>

                               <url>https://maven.nuxeo.org/nexus/content/groups/public/</url>

                               <layout>default</layout>

                               <releases>

                                    <enabled>true</enabled>

                                    <updatePolicy>never</updatePolicy>

                               </releases>

                               <snapshots>

                                    <enabled>true</enabled>

                                    <updatePolicy>never</updatePolicy>

                               </snapshots>

                          </repository>

                          <repository>

                               <id>Prime Technology Maven Repository</id>

                               <url>http://repository.primefaces.org</url>

                          </repository>

                     </repositories>

                     <build>

                          <finalName>forgetest2</finalName>

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

                                    <extensions>false</extensions>

                                    <configuration>

                                         <failOnMissingWebXml>false</failOnMissingWebXml>

                                    </configuration>

                               </plugin>

                          </plugins>

                     </build>

                </project>

                {code}

                 

                I am also now using maven 3.0.3 on the command line, in eclipse @deployment and Archillian.class are missing in the classpath, and in the command line I get this

                 

                kelly@kelly-pc:~/newwksp/forge2$ /usr/local/apache-maven-3.0.3/bin/mvn verify

                [INFO] Scanning for projects...

                [WARNING]

                [WARNING] Some problems were encountered while building the effective model for com.forge.example:forgetest2:war:1.0.0-SNAPSHOT

                [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 155, column 12

                [WARNING]

                [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

                [WARNING]

                [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

                [WARNING]

                [INFO]                                                                        

                [INFO] ------------------------------------------------------------------------

                [INFO] Building forgetest2 1.0.0-SNAPSHOT

                [INFO] ------------------------------------------------------------------------

                [INFO]

                [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ forgetest2 ---

                [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

                [INFO] Copying 2 resources

                [INFO]

                [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ forgetest2 ---

                [INFO] Nothing to compile - all classes are up to date

                [INFO]

                [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ forgetest2 ---

                [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

                [INFO] Copying 1 resource

                [INFO]

                [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ forgetest2 ---

                [INFO] Nothing to compile - all classes are up to date

                [INFO]

                [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ forgetest2 ---

                [INFO] Surefire report directory: /home/kelly/newwksp/forge2/target/surefire-reports

                java.lang.reflect.UndeclaredThrowableException

                          at $Proxy0.invoke(Unknown Source)

                          at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)

                          at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)

                          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

                Caused by: java.lang.reflect.InvocationTargetException

                          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)

                          ... 4 more

                Caused by: java.lang.NoClassDefFoundError: org/jboss/shrinkwrap/api/spec/JavaArchive

                          at java.lang.Class.getDeclaredMethods0(Native Method)

                          at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)

                          at java.lang.Class.getMethod0(Class.java:2670)

                          at java.lang.Class.getMethod(Class.java:1603)

                          at org.apache.maven.surefire.util.ReflectionUtils.tryGetMethod(ReflectionUtils.java:57)

                          at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isSuiteOnly(JUnit3TestChecker.java:65)

                          at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isValidJUnit3Test(JUnit3TestChecker.java:60)

                          at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.accept(JUnit3TestChecker.java:55)

                          at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:52)

                          at org.apache.maven.surefire.util.DefaultDirectoryScanner.locateTestClasses(DefaultDirectoryScanner.java:80)

                          at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:164)

                          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:86)

                          ... 9 more

                Caused by: java.lang.ClassNotFoundException: org.jboss.shrinkwrap.api.spec.JavaArchive

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

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

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

                          ... 21 more

                [INFO] ------------------------------------------------------------------------

                [INFO] BUILD FAILURE

                [INFO] ------------------------------------------------------------------------

                [INFO] Total time: 1.293s

                [INFO] Finished at: Fri Jan 27 13:09:53 BRST 2012

                [INFO] Final Memory: 8M/213M

                [INFO] ------------------------------------------------------------------------

                [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project forgetest2: There are test failures.

                [ERROR]

                [ERROR] Please refer to /home/kelly/newwksp/forge2/target/surefire-reports for the individual test results.

                [ERROR] -> [Help 1]

                [ERROR]

                [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

                [ERROR] Re-run Maven using the -X switch to enable full debug logging.

                [ERROR]

                [ERROR] For more information about the errors and possible solutions, please read the following articles:

                [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

                 

                • 5. Re: Arquillian tests in eclipse log error
                  Bartosz Majsak Master

                  First thing: Arquillian JUnit container is required, but you don't need to specify <version> anymore - it's taken from BOM which you have just included.

                   

                  Please also override surefire version:

                   

                   

                  {code:xml}

                    <build>

                       .....

                      <pluginManagement>

                        <plugins>

                          <plugin>

                            <artifactId>maven-surefire-plugin</artifactId>

                            <version>2.11</version>

                          </plugin>

                        </plugins>

                      </pluginManagement>

                       ....

                   

                    </build>

                  {code}

                   

                  Let me know if it helps.

                  • 6. Re: Arquillian tests in eclipse log error
                    kelly goedert Apprentice

                    Did all the changes you suggested. I am able to run everything on the command line, but inside eclipse the error is still the same. is there any other way I should be running the tests inside eclipse other than run as -> junit test?

                    • 7. Re: Arquillian tests in eclipse log error
                      Bartosz Majsak Master

                      Another possibility is to look at some showcases, for instance:

                       

                      https://github.com/bartoszmajsak/Beer-Advisor

                      or

                      https://github.com/arquillian/arquillian-showcase

                       

                      Maybe it will help setting up POM correctly. But if you can run your tests from mvn command line, then there is definitely something added to Eclipse classpath which is causing the initial problem.

                       

                      Would it be possible to paste screenshot with expanded project view from Eclipse?

                      • 8. Re: Arquillian tests in eclipse log error
                        kelly goedert Apprentice

                        Hi,

                         

                        here is the print screen, let me know if it has enough info.

                         

                        expanded.jpg

                        • 9. Re: Arquillian tests in eclipse log error
                          Bartosz Majsak Master

                          Thanks! Would it be possible to attach .classpath and .project as well? Do you have JBoss added to Eclipse or are you starting it from cmd line?

                          • 10. Re: Arquillian tests in eclipse log error
                            kelly goedert Apprentice

                            Hi,

                             

                            sorry for the delay... I didn't have access to this computer during the weekend. I am running jboss from eclipse, using jboss tools runtime configuration. My .classpath looks like this:

                             

                            <?xml version="1.0" encoding="UTF-8"?>

                            <classpath>

                                      <classpathentry kind="src" output="target/classes" path="src/main/java"/>

                                      <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>

                                      <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>

                                      <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>

                                      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

                                      <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">

                                                <attributes>

                                                          <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

                                                </attributes>

                                      </classpathentry>

                                      <classpathentry kind="output" path="target/classes"/>

                            </classpath>

                             

                            and my .project like this:

                             

                            <?xml version="1.0" encoding="UTF-8"?>

                            <projectDescription>

                                      <name>forge2</name>

                                      <comment></comment>

                                      <projects>

                                      </projects>

                                      <buildSpec>

                                                <buildCommand>

                                                          <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.eclipse.jdt.core.javabuilder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.eclipse.wst.common.project.facet.core.builder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.jboss.tools.jst.web.kb.kbbuilder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.jboss.tools.cdi.core.cdibuilder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.jboss.tools.ws.jaxrs.metamodelBuilder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.eclipse.wst.validation.validationbuilder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.hibernate.eclipse.console.hibernateBuilder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                                <buildCommand>

                                                          <name>org.eclipse.m2e.core.maven2Builder</name>

                                                          <arguments>

                                                          </arguments>

                                                </buildCommand>

                                      </buildSpec>

                                      <natures>

                                                <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

                                                <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>

                                                <nature>org.eclipse.jdt.core.javanature</nature>

                                                <nature>org.eclipse.m2e.core.maven2Nature</nature>

                                                <nature>org.eclipse.wst.common.project.facet.core.nature</nature>

                                                <nature>org.jboss.tools.jst.web.kb.kbnature</nature>

                                                <nature>org.jboss.tools.cdi.core.cdinature</nature>

                                                <nature>org.hibernate.eclipse.console.hibernateNature</nature>

                                                <nature>org.jboss.tools.jsf.jsfnature</nature>

                                                <nature>org.eclipse.wst.jsdt.core.jsNature</nature>

                                                <nature>org.jboss.tools.ws.jaxrs.nature</nature>

                                      </natures>

                            </projectDescription>

                             

                            Let me know if you need anything else.

                             

                            Kelly

                            • 11. Re: Arquillian tests in eclipse log error
                              kelly goedert Apprentice

                              I just tried a new eclipse indigo installation, with maven integration plugin and jboss tools, and it worked. Some other plugin or configuration were probably the ones causing all the trouble.

                               

                              Kelly

                              • 12. Re: Arquillian tests in eclipse log error
                                kelly goedert Apprentice

                                I got it wrong again. Just close eclipse, start it again, and... the problem is back!!