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

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

Hi,

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.

Thanks,

Dev
dev.sam
 
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">
<jvm-options>-agentpath:"D:\YourKit2018.04-b88\bin\win64\yjpagent.dll"=disablestacktelemetry,exceptions=disable,delay=10000,sessionname=Glassfish</jvm-options>
<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
</profiler>

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
Dev
dev.sam
 
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: 5824
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Google [Bot] and 17 guests