Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
  • Community
  • Products
  • Clover
  • Questions
  • Using the eclipse plugin while running my application I get, "Caused by: java.lang.ClassNotFoundException: com_cenqua_clover.CoverageRecorder"

Using the eclipse plugin while running my application I get, "Caused by: java.lang.ClassNotFoundException: com_cenqua_clover.CoverageRecorder"

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)

3 answers

1 accepted

0 votes
Answer accepted

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.

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

0 votes

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Opsgenie

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

104 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you