Issue Details (XML | Word | Printable)

Key: CEP-2
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Michael Studman [Atlassian]
Reporter: Andy Armstrong
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Clover Eclipse Plugin

Cannot run instrumented Eclipse plugins

Created: 18/Sep/07 11:37 PM   Updated: 24/Apr/08 03:59 PM
Component/s: None
Affects Version/s: 2.0.0.b2_1 (beta 2), 2.0.0.v20071016211452 (final), 2.0.1.v20071022194021, 2.0.2.v20071101122659
Fix Version/s: 2.0.3.v20071203123733

Time Tracking:
Not Specified

File Attachments: 1. Text File .log (341 kB)

Environment: Eclipse 3.2.2, Clover 2.0.0.b1, JDK 1.5.0_10, Windows XP

Participants: Andy Armstrong and Michael Studman [Atlassian]
Since last comment: 1 year, 2 weeks, 3 days ago
Resolution Date: 15/Nov/07 11:28 AM


 Description  « Hide
The project I'm working on is an Eclipse product built as a set of dependent Eclipse plugins, and the code runs fine when not instrumented. As soon as I switch on Clover capabilities, I find that I can no longer run my Eclipse product. I always get the following error:

[CLOVER] FATAL ERROR: Clover could not be initialised. Are you sure you have Clover in the runtime classpath? (class java.lang.NoClassDefFoundError:com_cenqua_clover/CloverVersionInfo)

I'm guessing that this is a problem with Eclipse's non-standard class loader, such that the Clover initialization is happening on the wrong class loader somehow.

Is this a known limitation of the Clover plugin, or should I expect this to work? What other information can I provide to help debug this (I've attached the log file)?



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Michael Studman [Atlassian] added a comment - 25/Sep/07 03:09 PM
We have tested support for regular Java applications (launched through a Java Application config or through the JUnit config) and individual Eclipse plugins (launched through an Eclipse Application config or through a JUnit Plug-in Test config). We have not yet tested Clover support for Eclipse products or OSGI framework plugins. Running and testing Eclipse plugins requires a bit of extra manual configuration.

If you are running or testing plug-ins instrumented by Clover you will need to add the plugin com.cenqua.clover.core to your plugin dependencies so that the clover runtime classes are visible to it when it executes. I realise this may not be ideal especially in your case as you may have a large number of plugins requiring this treatment and you probably don't want to have to add or remove the dependency each time you release. We hope to have a better solution in place for this but I doubt this will be before the full 2.0 release.

I'm keen to see if I can provide you with some workaround or way ahead with your particular circumstances. Could you tell me how you launch and unit test your application (ie which type of launch configs do you use).


Michael Studman [Atlassian] added a comment - 05/Nov/07 09:45 AM
I've got a fix nearly ready for this. Scheduled for the next release.

Michael Studman [Atlassian] added a comment - 15/Nov/07 11:28 AM
Fix applied. Scheduled for next build.