3 Replies Latest reply on May 7, 2010 8:35 AM by Nick Belaevski

    Using Cobertura in components generated with the CDK

    Paulo Pinto Novice

      Hi everyone,

       

      I am trying to make use of Cobertura for the unit tests in some components that we have generated with the CDK. These projects are also using Maven as the build tool.

       

      Every other project in our build is able to compile and run with Cobertura without any issue, but in the CDK generated projects we get the following exception

       

       

      urls[0] = file:/C:/calypso_tools/repository/org/richfaces/cdk/maven-cdk-plugin/3.3.3.Final/maven-cdk-plugin-3.3.3.Final.jar
      urls[1] = file:/C:/calypso_tools/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
      urls[2] = file:/C:/calypso_tools/repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar
      urls[3] = file:/C:/calypso_tools/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
      urls[4] = file:/C:/calypso_tools/repository/org/apache/maven/shared/file-management/1.1/file-management-1.1.jar
      urls[5] = file:/C:/calypso_tools/repository/org/apache/maven/shared/maven-shared-io/1.0/maven-shared-io-1.0.jar
      urls[6] = file:/C:/calypso_tools/repository/org/codehaus/plexus/plexus-velocity/1.1.2/plexus-velocity-1.1.2.jar
      urls[7] = file:/C:/calypso_tools/repository/plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.jar
      urls[8] = file:/C:/calypso_tools/repository/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
      urls[9] = file:/C:/calypso_tools/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar
      urls[10] = file:/C:/calypso_tools/repository/velocity/velocity/1.4/velocity-1.4.jar
      urls[11] = file:/C:/calypso_tools/repository/velocity/velocity-dep/1.4/velocity-dep-1.4.jar
      urls[12] = file:/C:/calypso_tools/repository/org/richfaces/cdk/generator/3.3.3.Final/generator-3.3.3.Final.jar
      urls[13] = file:/C:/calypso_tools/repository/ant/ant/1.6.5/ant-1.6.5.jar
      urls[14] = file:/C:/calypso_tools/repository/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.jar
      urls[15] = file:/C:/calypso_tools/repository/commons-logging/commons-logging/1.0/commons-logging-1.0.jar
      urls[16] = file:/C:/calypso_tools/repository/commons-digester/commons-digester/1.5/commons-digester-1.5.jar
      urls[17] = file:/C:/calypso_tools/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
      urls[18] = file:/C:/calypso_tools/repository/javax/faces/jsf-api/1.2_12/jsf-api-1.2_12.jar
      urls[19] = file:/C:/calypso_tools/repository/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar
      urls[20] = file:/C:/calypso_tools/repository/javax/el/el-api/1.0/el-api-1.0.jar
      urls[21] = file:/C:/calypso_tools/repository/el-impl/el-impl/1.0/el-impl-1.0.jar
      urls[22] = file:/C:/calypso_tools/repository/qdox/qdox/1.6/qdox-1.6.jar
      urls[23] = file:/C:/calypso_tools/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar
      urls[24] = file:/C:/calypso_tools/repository/asm/asm/1.5.3/asm-1.5.3.jar
      urls[25] = file:/C:/calypso_tools/repository/com/wutka/dtdparser/1.21/dtdparser-1.21.jar
      urls[26] = file:/C:/calypso_tools/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar
      [FATAL ERROR] Container realm = plexus.core
      urls[0] = file:/c:/Program Files/apache-maven-2.1.0/bin/../lib/maven-2.1.0-uber.jar
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] net/sourceforge/cobertura/coveragedata/HasBeenInstrumented
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NoClassDefFoundError: net/sourceforge/cobertura/coveragedata/HasBeenInstrumented
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at org.ajax4jsf.builder.config.ComponentBaseBean.checkProperties(ComponentBaseBean.java:165)
              at org.ajax4jsf.builder.config.ComponentBean.checkProperties(ComponentBean.java:132)
              at org.ajax4jsf.builder.config.BuilderConfig.checkComponentProperties(BuilderConfig.java:489)
              at org.ajax4jsf.builder.mojo.GenerateMojo.createConfig(GenerateMojo.java:293)
              at org.ajax4jsf.builder.mojo.GenerateMojo.execute(GenerateMojo.java:99)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1168)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1009)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:647)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
              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:585)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      

       

       

      Has anyone already faced a similar experience? Any ideas what might be the issue?

       

      Thanks in advance,

      Paulo