我将 JProfiler 7 配置为与本地运行的 Weblogic 8.1 集成。
使用 JProfiler 生成的脚本(名为 startWebLogic_jprofiler.cmd)似乎 weblogic 启动得很好
CLASSPATH=C:\bea;C:\J2SDK1~1.2_1\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\user_projects\domains\mydomain\lib\sqljdbc-1.2.jar;;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;C:\J2SDK1~1.2_1\jre\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\webservices.jar;;C:\bea\user_projects\domains\mydomain\lib\wlstartup.jar;C:\bea\user_projects\domains\mydomain\lib\SpectrumRealmUtils.jar
.
PATH=C:\bea\WEBLOG~1\server\bin;C:\J2SDK1~1.2_1\jre\bin;C:\J2SDK1~1.2_1\bin;C:\Program Files\jprofiler7\bin\..\lib;C:\Program Files\jprofiler7\bin\windows;C:\Program Files\YourKit Java Profiler 7.5.11\bin\win32;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\tptp\bin;;c:\program files\jprofiler7\jre\bin;C:\bea\WEBLOG~1\server\bin\oci920_8
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\[hostname]:[port]\console *
***************************************************
JProfiler> Protocol version 35
JProfiler> Using JVMPI
JProfiler> 32-bit library
JProfiler> Listening on port: 8849.
JProfiler> Native library initialized
JProfiler> If output stops here, please remove -Xdebug from the command line
java.lang.ClassFormatError: Incompatible magic value in .class file
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:122)
<Jun 2, 2012 2:45:45 PM PDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2_19-b04 from Sun Microsystems Inc.>
<Jun 2, 2012 2:45:45 PM PDT> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>
<Jun 2, 2012 2:45:45 PM PDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP6 Wed Jun 21 08:18:55 PDT 2006 781680
WebLogic XMLX Module 8.1 SP6 Wed Jun 21 08:18:55 PDT 2006 781680 >
<Jun 2, 2012 2:45:45 PM PDT> <Notice> <Management> <BEA-140005> <Loading domain configuration from configuration repository at C:\bea\user_projects\domains\mydomain\.\config.xml.>
<Jun 2, 2012 2:45:46 PM PDT> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea\user_projects\domains\mydomain\myserver\myserver.log is opened. All server side log events will be written to this file.>
SpectrumAuthenticationProviderImpl.initialize
SpectrumAuthenticationProviderImpl.initialize-after mbean
然而,jprofiler 部分会出错并显示以下消息(分析永远不会发生):
Could not connect to 127.0.0.1:8849.Please make sure that the remote address is correct, the remote program is started properly and the netword route allows socket connections.
我为 PATH 添加了以下内容:
路径 = C:\Program Files\jprofiler7\bin\windows;
并修改了我的 startWeblogic.cmd(JProfiler 7 从中衍生出自己的脚本)
设置 JAVA_VM=-agentpath:C:\Program Files\jprofiler7\bin\windows\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml
我进入 Windows 7 防火墙并添加了一个打开端口 8849 的新规则——但这并没有帮助。
令人恼火的是,我可以使用 JProfiler 生成的脚本调出 weblogic 的管理控制台(127.0.0.1:7001/console)——但我无法让 JProfiler 实际探测!?!?!
有什么建议么 ?