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.

Could not initialize class java.awt.Toolkit

Moderators: Vladimir Kondratyev, Anton Katilin

Could not initialize class java.awt.Toolkit

Postby wesley.lago » Mon Mar 23, 2015 4:32 pm

I'm having trouble starting the yjp.sh, anyone seen this?

/opt/yjp-2014-build-14120/bin/yjp.sh
[YourKit Java Profiler 2014 build 14120] Log file: /opt/liferay/.yjp/log/yjp-26903.log
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.yourkit.Main$2.run(a:16)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:611)
at com.yourkit.Main1.entry(a:69)
... 5 more


Thanks
wesley.lago
 
Posts: 1
Joined: Mon Mar 23, 2015 4:29 pm

Re: Could not initialize class java.awt.Toolkit

Postby Anton Katilin » Tue Mar 24, 2015 7:45 am

Running yjp.sh without parameters launches the profiler UI. It cannot run in headless mode.

Does the system have a display?
What is the content of /opt/liferay/.yjp/log/yjp-26903.log ?
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Could not initialize class java.awt.Toolkit

Postby duane » Fri May 22, 2015 1:41 am

I am also have similar problems running YourKit remotely.

I am connecting the linux system using ssh -X, so there is a XWindows session available. I am able to run other XWindows application such as Firefox just fine.

How can I run YourKit over an XWindows session?

Thanks,
...Duane
duane
 
Posts: 1
Joined: Thu May 21, 2015 11:11 pm

Re: Could not initialize class java.awt.Toolkit

Postby Anton Katilin » Fri May 22, 2015 3:50 pm

Hi Duane

You should not run the profiler UI remotely. It's a Java UI application and it may not work well this way.

Instead, please run the profiler client on your local machine and use the remote profiling feature to connect to the remote profiled application.

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


Return to Java Profiler

Who is online

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

cron