Ant*_* O. 6 profiling web-applications jvisualvm jboss7.x
我想在JBoss 7上使用JVisualVM来描述我的webapp.
所以我启动了该工具,并打开运行JBoss的JVM.
我点击"Profiler","设置"和"CPU设置"我把它:
"从类开始分析:":com.mycompany.myapp.action.**
配置新的Runnables
"仅配置文件类:":com.mycompany.*
当我点击"CPU"(配置CPU)时,在JBoss中我得到了:
Profiler Agent: 250 classes cached.
Profiler Agent: Redefining 100 classes at idx 0, out of total 188
Profiler Agent: Redefining 88 classes at idx 100, out of total 188
10:26:05,720 ERROR [stderr] (server-timer1) Exception in thread "server-timer1" java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
10:26:05,721 ERROR [stderr] (server-timer1) at org.jboss.sun.net.httpserver.ServerImpl$ServerTimerTask1.run(ServerImpl.java:895)
10:26:05,722 ERROR [stderr] (server-timer1) at java.util.TimerThread.mainLoop(Timer.java:534)
10:26:05,722 ERROR [stderr] (server-timer1) at java.util.TimerThread.run(Timer.java:484)
Run Code Online (Sandbox Code Playgroud)
通过谷歌搜索,似乎我必须添加jfluid-server.jar JBoss类路径,但是当我使用Eclipse时,jar在我重新启动服务器之前就消失了......
其他人建议使用包含JBoss模块jar的类路径启动VisualVM,但我仍然在JBoss AS中有错误.
是否有配置standalone.xml才能将该jar添加到JBoss 7类路径?
谢谢 !
添加-Djboss.modules.system.pkgs=org.netbeans.lib.profiler.server到JVM参数似乎可以避免该异常.见https://issues.jboss.org/browse/JBAS-8927.