by 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