One of the plugins I am trying to get codecoverage on fails to load. It errors as in the question. The application is running but without some of its functions working. I do see the CLOVER_RUNTIME in the classpath of the project. How do I resolve this?
Full stacktrace:
Caused by: java.lang.ClassNotFoundException: com_cenqua_clover.CoverageRecorder
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
Disable clover on the project(s). Do clean and build project(s). Again enable clover on project(s) and try to launch it. it worked for me.
A clean re-installation of eclipse, clover and my projects resolved the issue. The specific error above occurred because I never got a "run with clover" toolbaritem, so I was trying to use standard run and debug configurations. I had gotten the clover explorer and other clover views, but not the run with clover. Since I had not used clover for sometime I had forgotten about it.
Thanks for you response. If someone else runs into this, I would recommend that you confirm you are using a clover run configuration. I would also confirm that your .project and .classpath have the proper clover attributes added. There are docs on the specifics for these entries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Clover-for-Eclipse: @Ken: Make sure that you're using "Run with Clover as..." instead of "Run as..." in Eclipse. Alternatively, if you can't use this option (you want to use Debug/Profile for instance) then add the Clover runtime jar to Xbootclasspath. See Instrumenting+RCP+Application.
Clover-for-Maven: @David: I guess that your Maven build deploys some jars to application server and runs tests there (typical for integration tests) or runs in-container tests. If this is the case, make sure that you have 'com.cenqua.clover:clover' on your <dependencies> list. Alternatively, put clover.jar into application server /lib directory or add it to CLASSPATH during server startup.
Regards
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get the same ClassNotFoundException running the automatically configured Clover build from Bamboo 3.2.1. It's a multimodule build and Bamboo is running the command:
/home/eufxcadm/apache-maven-3.0.3/bin/mvn -Djava.io.tmpdir=/tmp/CORENIGHTLY-JOB1 -U -B clean deploy clean com.atlassian.maven.plugins::maven-clover2-plugin:setup verify com.atlassian.maven.plugins::maven-clover2-plugin:aggregate com.atlassian.maven.plugins::maven-clover2-plugin:clover -Dmaven.clover.generateJson=false -Dmaven.clover.licenseLocation=/core/.clover/clover.license
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.