JProfiler не запускается
Я настроил JProfiler 7 для интеграции с Weblogic 8.1, работающим локально.
Похоже, что weblogic прекрасно запускается с помощью сценария, созданного JProfiler (с именем startWebLogic_jprofiler.cmd)
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 выводит свой собственный скрипт)
set JAVA_VM = -agentpath: C: \ Program Files \ jprofiler7 \ bin \ windows \ jprofilerti.dll = порт =8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml
Я вошел в брандмауэр Windows 7 и добавил новое правило, открывающее порт 8849 - однако это не помогло.
Это раздражает, потому что я могу вызвать консоль администратора для weblogic (127.0.0.1:7001/console) С помощью скрипта, сгенерированного JProfiler, - но я не могу заставить JProfiler на самом деле исследовать!?!?!
Какие-либо предложения?
1 ответ
Вы используете 1.4 JVM, поэтому параметры виртуальной машины
-agentpath:C:\Program Files\jprofiler7\bin\windows\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml
не будет работать, так как это для Java 1.5+ и нового интерфейса профилирования JVMTI.
Пытаться
-Xrunjprofiler:port=8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml
Вы должны добавить
C:\Program Files\jprofiler7\bin\windows
к PATH
переменная окружения для Java 1.4.