使用VisualVm分析本地JBoss 7时出错

时间:2012-07-31 03:37:05

标签: jboss rmi visualvm

我正在尝试使用jdk6中打包的visualvm工具来配置本地JBoss 7服务器。我可以将visualvm连接到本地jboss服务器。但是,如果我在visualvm的profiler选项卡中启动CPU分析,JBoss服务器会转储大量错误消息,如下所示。

为什么?

11:22:38,220 INFO  [stdout] (*** Profiler Agent Communication Thread) Profiler Agent: Waiting for connection on port 5140 (Protocol version: 9)
11:22:38,320 INFO  [stdout] (*** Profiler Agent Special Execution Thread 5) Profiler Agent: Established local connection with the tool
11:22:49,516 ERROR [stderr] (server-timer1) Exception in thread "server-timer1" java.lang.ClassCircularityError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
11:22:49,520 ERROR [stderr] (server-timer1)     at org.jboss.sun.net.httpserver.ServerImpl$ServerTimerTask1.run(ServerImpl.java:895)
11:22:49,524 ERROR [stderr] (server-timer1)     at java.util.TimerThread.mainLoop(Timer.java:512)
11:22:49,526 ERROR [stderr] (server-timer1)     at java.util.TimerThread.run(Timer.java:462)
11:22:49,528 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)" java.lang.ClassCircularityError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
11:22:49,532 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)"   at org.jboss.logmanager.Logger.isLoggable(Logger.java:153)
11:22:49,535 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.runtime.Log$LoggerLog.isLoggable(Log.java:206)
11:22:49,538 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.runtime.Log$LoggerLog.log(Log.java:210)
11:22:49,539 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)"   at sun.rmi.transport.tcp.TCPConnection.close(TCPConnection.java:201)
11:22:49,542 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:564)
11:22:49,545 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
11:22:49,547 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
11:22:49,549 ERROR [stderr] (RMI TCP Connection(idle))  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
11:22:49,552 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)"   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
11:22:49,556 ERROR [stderr] (RMI TCP Connection(idle))  at java.lang.Thread.run(Thread.java:619)
11:22:49,560 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)" java.lang.ClassCircularityError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
11:22:49,563 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)"    at org.jboss.logmanager.Logger.isLoggable(Logger.java:153)
11:22:49,567 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)"   at sun.rmi.runtime.Log$LoggerLog.isLoggable(Log.java:206)
11:22:49,569 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.runtime.Log$LoggerLog.log(Log.java:210)
11:22:49,572 ERROR [stderr] (RMI TCP Connection(idle)) Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)"     at sun.rmi.transport.tcp.TCPConnection.close(TCPConnection.java:201)
11:22:49,577 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:564)
11:22:49,581 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
11:22:49,584 ERROR [stderr] (RMI TCP Connection(idle))  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
11:22:49,588 ERROR [stderr] (RMI TCP Connection(idle))  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
11:22:49,592 ERROR [stderr] (RMI TCP Connection(idle))  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
11:22:49,595 ERROR [stderr] (RMI TCP Connection(idle))  at java.lang.Thread.run(Thread.java:619)
11:22:49,597 ERROR [stderr] (RMI TCP Connection(idle)) java.lang.ClassCircularityError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr

2 个答案:

答案 0 :(得分:3)

在第%JBOSS_HOME%/bin/standalone.conf.bat

之前的":JAVA_OPTS_SET"添加以下行
set "JAVA_OPTS=%JAVA_OPTS% -Xshare:off -Djboss.modules.system.pkgs=org.netbeans.lib.profiler.server -Dorg.osgi.framework.bootdelegation=org.netbeans.lib.profiler.server,org.netbeans.lib.profiler.server.*"

或者以任何其他有效的方式添加提到的java选项。

答案 1 :(得分:0)

el fuego的回答对我有用..

我将该行放在standalone.bat中,如下所示:

set "JAVA_OPTS=%JAVA_OPTS% -Xshare:off -Djboss.modules.system.pkgs=org.netbeans.lib.profiler.server -Dorg.osgi.framework.bootdelegation=org.netbeans.lib.profiler.server,org.netbeans.lib.profiler.server.*"

echo ===============================================================================
echo.
echo   JBoss Bootstrap Environment