Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Modify glassfish startup files to attach YourKit 2018.04-b88

Moderators: Vladimir Kondratyev, Anton Katilin

Modify glassfish startup files to attach YourKit 2018.04-b88

Postby dev.sam » Thu Aug 22, 2019 9:13 am


I am trying to attach YourKit version 2018.04-b88 with glassfish (payara41).

Can you please help me with the startup configuration file changes for glassfish server so that I can attach YourKit at the time of starting glassfish server.


Posts: 15
Joined: Tue Jul 18, 2017 9:14 am

Re: Modify glassfish startup files to attach YourKit 2018.04

Postby dev.sam » Fri Aug 23, 2019 4:08 am

In continuation to my previous post, please find below what I am trying to do while configuring yourkit in glassfish server:

In startserv.bat file:
java -jar "%~dp0..\modules\admin-cli.jar" start-domain -agentpath:"D:\YourKit2018.04-b88\bin\win64\yjpagent.dll"=disablestacktelemetry,exceptions=disable,delay=10000,sessionname=JBoss -Dexport.method.list.cpu -Dexport.csv -Djboss.modules.system.pkgs=com.yourkit -Dtracing_settings_path=D:/Users/vishal_m/.yjp/tracing.txt --verbose %*

In domain.xml file, added following lines in <domain> tree:

<profiler native-library-path="" classpath="" name="YourKit">

However, I get the following error when I try to start the yourkit profiler via my Java code application:

[2019-08-22T17:25:10.369+0530] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=27 _ThreadName=http-listener-1(1)] [timeMillis: 1566474910369] [levelValue: 900] [[
StandardWrapperValve[tracing]: Servlet.service() for servlet tracing threw exception
java.lang.ClassNotFoundException: com.yourkit.api.Controller
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at com.hcl.nexgen.icbt.yourkit.instrumentation.service.TracingManagerImpl.startProfiling(TracingManagerImpl.java:46)
at com.hcl.nexgen.icbt.yourkit.instrumentation.controller.TracingController.startProfiling(TracingController.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Requesting you to please guide me so that yourkit gets configured via the config files of glassfish server.

Thanks in Advance
Posts: 15
Joined: Tue Jul 18, 2017 9:14 am

Re: Modify glassfish startup files to attach YourKit 2018.04

Postby Anton Katilin » Fri Aug 23, 2019 7:25 am

Version 2018.04 is no longer supported. Please use the latest version 2019.8 instead.

Please use "Profile local EE server or application" from the profiler's Welcome screen to let the wizard make necessary changes for you.

For a remote server use this instead:
https://www.yourkit.com/docs/java/help/ ... remote.jsp
Anton Katilin
Posts: 6027
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest


YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.