Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

ClassNotFoundException when attaching to local process

Moderators: Vladimir Kondratyev, Anton Katilin

ClassNotFoundException when attaching to local process

Postby yannick » Tue Apr 21, 2015 4:19 pm

Hello !

I'm trying to attach Yourkit to a local JBoss server and getting a ClassNotFoundException: com.yourkit.runtime.Callback on the server. The JBoss is not started with Yourkit agent.

What I want to do is CPU profiling.

I understand I could add Yourkit classes to the classpath of the server.

But I'm wondering if there is a way to attach Yourkit to a process without doing any instrumentation, like I reckon JConsole or JVisualvm do ?

Thanks in advance


Yannick
yannick
 
Posts: 3
Joined: Tue Apr 21, 2015 4:08 pm

Re: ClassNotFoundException when attaching to local process

Postby Anton Katilin » Thu Apr 23, 2015 8:16 am

Hi Yannick

When attaching, please specify the startup option "disableall" to avoid bytecode instrumentation.
Does it help?

Best regards,
Anton
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: ClassNotFoundException when attaching to local process

Postby yannick » Sat Apr 25, 2015 2:08 pm

Thank you for this answer ! I'll try that.
Also maybe you'll be interested to know I didn't get any notification that you answered !
yannick
 
Posts: 3
Joined: Tue Apr 21, 2015 4:08 pm

Re: ClassNotFoundException when attaching to local process

Postby Anton Katilin » Mon Apr 27, 2015 8:37 am

Hi Yannick

Did it help?

Also maybe you'll be interested to know I didn't get any notification that you answered !

Do you mean the email notification? Perhaps it was a spam filtering issue.

Best regards,
Anton
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: ClassNotFoundException when attaching to local process

Postby yannick » Mon Apr 27, 2015 10:30 am

When attaching, please specify the startup option "disableall" to avoid bytecode instrumentation.

It does work ! Thanks !
Now I'm doing it by right-clicking the process / Attach with custom startup options / typing "disableall" in the text field. Is there a way to set it as a default ?

Also, I know JBoss does nothing like the others :) but trying to attach without the disableall option breaks the server :(
So it would be good if you good detect beforehand that yourkit classes are not available and default to no instrumentation mode if it is possible.

Do you mean the email notification? Perhaps it was a spam filtering issue.

Yes that is what I meant ! And no I couldn't find your mail in the spam folder.
yannick
 
Posts: 3
Joined: Tue Apr 21, 2015 4:08 pm

Re: ClassNotFoundException when attaching to local process

Postby Anton Katilin » Mon Apr 27, 2015 3:23 pm

Is there a way to set it as a default ?

No.

Instead, I suggest to set the environment variable YJP_STARTUP_OPTIONS_PRE to disableall, e.g. for the user under which you run the profiled application. Profiled processes will prepend their normally supplied startup options (empty by default, if you attach by double-clicking) with its value.

So it would be good if you good detect beforehand that yourkit classes are not available and default to no instrumentation mode if it is possible.
Unfortunately, this is technically impossible: instrumentation is performed (or not performed) on a lower level than class loading, and earlier than when it is possible to detect whether the agent classes can be loaded or not.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot] and 7 guests