JProfiler would not start up

3.1k views Asked by At

I configured JProfiler 7 to be integrated with Weblogic 8.1 running locally.

It appears that weblogic starts up just fine with the JProfiler generated script (named 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

The jprofiler piece however errors out with the following message (the profiling never happens):

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.

I added the following for PATH:

Path = C:\Program Files\jprofiler7\bin\windows;

and modified my startWeblogic.cmd (from which JProfiler 7 spins off its own script)

set JAVA_VM=-agentpath:C:\Program Files\jprofiler7\bin\windows\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml

I went into the Windows 7 firewall and added a New Rule which opens up port 8849 - however that did not help.

Its exasperating because I can bring up the admin console for weblogic (127.0.0.1:7001/console) WITH the JProfiler generated script - but I cannot get JProfiler to actually probe !?!?!

Any suggestions ?

1

There are 1 answers

0
Ingo Kegel On

You are using a 1.4 JVM, so the VM parameters

-agentpath:C:\Program Files\jprofiler7\bin\windows\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml

would not work, since that is for Java 1.5+ and the new profiling interface JVMTI.

Try

-Xrunjprofiler:port=8849,nowait,id=117,config=C:\Users\resmed.jprofiler7\config.xml

You have to add

C:\Program Files\jprofiler7\bin\windows

to the PATH environment variable for Java 1.4.