[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.hyades] Re: Problem loading classes from external jars

I confirm this behavior on Eclipse 3.0.1 with the Hyades 3.2.0_20041206_1849 build.

Thomas

Curtis d'Entremont wrote:


We've reopened the bug and are investigating the problem.

Thanks,
Curt

Lubos Pochman wrote:

I have installed Eclipse 3.01 and reinstalled Hyades 3.2, and I am still getting NoClassDefFoundError, when I profile the application and class is located in jar file.
So Eclipse 3.1 is not the culprit.
It must be something peculiar in my setup, the main application class is in classes subdirectory of the current application directory, but external jars are in ../external/lib/*.jar jar files.
When I check the properties dialog, the jars are in the classpath properly, but profiler cannot find them (sorry I cannot copy the classpath from the dialog, because the properties dialog is non-sensitive, and doesn't allow copy).

It looks like the bug should be reopened, and I would be glad to help to debug the problem.

I have filed the same comments in bugzilla with the bug.

Curtis d'Entremont wrote:


It looks like you're profiling a fairly CPU-intensive application. I'm assuming you're attempting to profile execution times, as this is the one that usually requires the most processing. The reason it's choking is because it's attempting to process a very large amount of data. Here are a few suggestions to cut down on this:

1. Make sure you're not collecting graphical flow information about the execution (in the Execution Time Analysis profiling type). This requires an extra amount of processing on the client side.

2. Narrow down the filters. In the edit profiling set dialog (click Edit in the Overview tab), you can click Next and see the filters. If you know that a particular class or method is being called millions of times, you can filter this one out. You won't get the base times (time spent in the method excluding method it calls), but you'll still get the cumulative times (including methods it calls) which are quite useful.

3. Try re-routing the profiling data to a file. This is done in the Destination sub-tab of the Profiling tab. Instead of processing the data and showing it in the UI, it will simply dump it to a file, which means you avoid a large amount of processing. Then, once you've finished profiling, import the data via the Import -> Profiling File wizard. Here you can pick which segment of the profiling session you'd like to import (e.g. the last 10%).

4. Set an upper limit on the amount of method calls profiled. This can be set in the Limits tab next to the Destination tab, where you can tell it to profile only the first x method calls, or the first x seconds of execution.

5. Manually start and stop monitoring. You can get a quick sampling of data by clicking on the Start Monitoring and Pause Monitoring buttons.

Hope this helps.

Thanks,
Curt

Lubos Pochman wrote:

Thanks Curt for responding.

As highlighted in the bug it looks like the problems is compatibility
with
Eclipse 3.1.
I have tried to run it as an external program, it runs and I can attach
to
it, but it requires so many resources (both CPU and memory), that evan my Pentium 4 3Gz with 512Mb of memory cannot handle it, and eventually the profiled application crashes (out of resources?).
So I think it is time for me to remove Hyades from my system and wait
when
it is more stable and part of the Eclipse IDE (or somebody writes JFluid plugin ;-).

Thanks, Lubos

Curtis d'Entremont wrote:


Hi Lubos,

Yes, I remember seeing (and fixing) this problem in 3.0, but apparently it's back. I reopened the bug it was tracked under and it will be fixed
in
3.2 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=55310).

In the meantime, the workaround is to run it normally in Run mode, and
add
the VM argument "-XrunpiAgent:server=controlled". Nothing will happen immediately - it's waiting for you to attach the profiler. To do this, create a new "Attach - Java Process" launch configuration and find the agent with the corresponding process ID.

Thank you for reporting this. If you like, you can add yourself to the
CC
list and get notified of any bug activity.

Thanks,
Curt

Lubos Pochman wrote:

I have problem profiling applications from Eclipse using Hyades plugin.
When I run application, that doesn't reference any external jars it
runs
OK.

When I start Profiling an application which references classes I am getting NoClassDefFoundError, but when I check the application
properties,
the jar in question is listed in classpath.

java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
at







com.insightful.infact.ontology.util.OntologyLookup.main(OntologyLookup.java:92)
Exception in thread "main"

Note that I am using for profiling same Run/Debug eclipse profile which works OK otherwise.
I also tried creating standalone java application result, but get the
same
result.

I use Eclipse 3.1, Haydes 3.2.0, (had same problems with Haydes 3.1).
Java 1.4.2_03.
Platform is Windows XP.

Anybody encountered similar problem?