5 Replies Latest reply: Feb 17, 2012 11:20 AM by Vineet Reynolds RSS

Problems in the use of arquillian-jacoco integrated with Jboss AS 7.0.2.Final

Marcos Portela Newbie

Hi,

 

I´ve problems in the use of arquillian-jacoco. I´ve got a exception in the execution of profile jbossas-managed-7.

 

Stack Trace Below:

 

11:31:35,433 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."DummyManagerTest.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."DummyManagerTest.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "DummyManagerTest.jar"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

Caused by: java.lang.LinkageError: Failed to link org/jboss/arquillian/jacocointegration/dummy/StatelessDummyManager (Module "deployment.DummyManagerTest.jar:main" from Service Module Loader)

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)

          at org.jboss.modules.Module.loadModuleClass(Module.java:590)

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)

          at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:201)

          at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:83)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

          ... 5 more

Caused by: java.lang.NoClassDefFoundError: net/sourceforge/cobertura/coveragedata/HasBeenInstrumented

          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]

          at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_24]

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)

          ... 15 more

 

I´m using the arquillian with Junit 4.8.2. The tests are passing. I saw this link: http://techblog.joserodolfo.com/2011/07/arquillian-coverage-tests-reported-with-sonar-howto/

However, I´m was not sucessful.

 

Code Snipet Below:

 

Relevant parts of my pom.xml:

 

<profile>

          <id>jbossas-managed-7</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.0.2.Final</version>

                    </dependency>

          </dependencies>

</profile>

 

<dependencies>
     <dependency>

               <groupId>junit</groupId>

               <artifactId>junit</artifactId>

           <scope>test</scope>

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

      </dependency>

 

       <dependency>

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

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

                <scope>test</scope>

                <version>1.0.0.Final-SNAPSHOT</version>

       </dependency>

 

        <!--  Jacoco - arquillian -->

        <dependency>

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

               <artifactId>arquillian-jacoco</artifactId>

                <scope>test</scope>

               <version>1.0.0-SNAPSHOT</version>

         </dependency>

 

          <dependency>

                    <groupId>org.jacoco</groupId>

                    <artifactId>org.jacoco.core</artifactId>

                    <scope>test</scope>

                    <version>0.5.3.201107060350</version>

           </dependency>

           <!--  Jacoco - arquillian -->

</dependencies>
              

My arquillian.xml:

 

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

<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xmlns="http://jboss.org/schema/arquillian"

          xsi:schemaLocation="http://jboss.org/schema/arquillian

                              http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

          <container qualifier="jbossas-remote-7" default="true">

      <configuration>

         <property name="jbossHome">D:\\desenvolvimento\\jboss-as-web-7.0.2.Final</property>

      </configuration>

   </container>

</arquillian>