Yourkit with Eclipse Maven project

Questions about YourKit Java Profiler
Post Reply
doniv79
Posts: 5
Joined: Fri Jun 10, 2005 5:09 am

Yourkit with Eclipse Maven project

Post by doniv79 »

Hi,

I've got a project that uses maven. The project is integrated into eclipse. I'm unable to get Yourkit to run properly. When I create a new configuration for JUnit and ask it to run all the JUnit tests in the src/test/java directory, it gives "Class not found" errors for all the test classes.

How do I get this to work?

Regards,
Vinod.
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

I create a new configuration for JUnit and ask it to run all the JUnit tests
Do you mean "run" tests or "profile" tests? If action "run" doesn't work, then it's not related to profiler.

Regards,
Vladimir
doniv79
Posts: 5
Joined: Fri Jun 10, 2005 5:09 am

Post by doniv79 »

Of course, "profile" tests.

I'm otherwise able to run the maven goals from within eclipse - without profiling support.

Regards,
Vinod.
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Hi Vinod,

sorry for delayed response. We are not familiar with maven very well, because we are not using it internally. Do you use special plug-in to work with maven? Does maven introduce special type of projects to Eclipse?

Of course, tiny toy project which demostrate the problem will help us a lot.

Regards,
Vladimir
doniv79
Posts: 5
Joined: Fri Jun 10, 2005 5:09 am

Post by doniv79 »

Hi there,

Eclipse requires the mevenide plugin to be able to run maven "goals". Maven has goals, which are similar to ant tasks. But in essence, what I need is to be able to run the JUnit tests that are part of my project. So I ask the Yourkit plugin to run the tests in the src/test/java directory, and it fails with a "Class not found" error. Looks more like a CLASSPATH issue to me. Is there any way I can tell the profiler plugin to set a particular CLASSPATH?

I'll try to send across a simple project today.

Thanks for the reply,
Vinod.
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

please also send us full text of "Class not found" error. We need to know name of the class which cannot be found.

Regards,
Vladimir
doniv79
Posts: 5
Joined: Fri Jun 10, 2005 5:09 am

Post by doniv79 »

It gives "Class not found" for each of the test classes.

Error messages are of the following format -

[YourKit Java Profiler 4.0.1] Using JVMTI
[YourKit Java Profiler 4.0.1] Listening on port 32326...
Class not found <fully qualified class name1>
Class not found <fully qualified class name2>
...

I tried playing around with different classpath settings in the configuration, but nothing worked. Seems like support for maven will have to be built into the plugin - doesnt seem like there is a workaround.

Regards,
Vinod.
doniv79
Posts: 5
Joined: Fri Jun 10, 2005 5:09 am

Post by doniv79 »

Managed to get this work long ago, but forgot to post abt it here.

Basically if the yourkit CLASSPATH is configured with the classes from target/classes and target/test-classes, yourkit works just fine.

Managed to get the maven application profiled from within eclipse finally!

Regards,
Vinod,
Post Reply