Home » Archived » Test and Performance Tools Platform (TPTP) » Sysdeo Tomcat plugin andf TPTP, do they work together?
| | |
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93282 is a reply to message #93182] |
Thu, 08 March 2007 08:59 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
david wrote:
> david wrote:
>> david wrote:
>>> Hi,
>>>
>>> Tried to use TPTP 4.3.0 with the Sysdeo Tomcat plugin. I installed
>>> the agentcontroller as specified. I added
>>> "-XrunpiAgent:server=enabled" to the JVM args for Tomcat in sysdeo.
>>> It cannot start the JVM with these args.
>>>
>>> I had tried using the Web Tools to run Tomcat, but could not get that
>>> to run a Apache Turbine web framework based webapp at all. So at the
>>> moment am at a loss as to how to get TPTP working with Sysdeo, advice
>>> is welcome.
>>>
>>> David
>> I noted the comment about using
>>
>> -agentlib:JPIBootLoader=JPIAgent:server=standalone,file=trac e.trcxml;CGProf
>>
>>
>> with Java 5
>>
>> I tried that too, it now produces no error that I can find but Sysdeo
>> no longer runs Tomcat. The debug window remains empty.
>>
>> Thx.
>>
>> David
> Next I thought well why not try the JVM arg mentioned in the "First
> Steps TPTP" thread.
>
> I added this to the JVM args in the Tomcat Windows service
>
> -agentlib:JPIBootLoader=JPIAgent:server=standalone,file=trac e.trcxml;CGProf
>
>
> and got
>
> java.lang.NoClassDefFoundError: start
>
> Exception in thread "main" java.lang.NoClassDefFoundError: start
>
> Exception in thread "main"
>
> in the std_err log for Tomcat.
>
> Will try alternate methods I think
>
> David
Hi,
This is rather disturbing. I have a standard Tomcat 5.5.17 windows
installation. I add the std
-agentlib:JPIBootLoader=JPIAgent:server=standalone,file=trac e.trcxml;CGProf
to the JVM arguments. And Tomcat fails to run with this additional
argument. Isn't that a pretty big problem for anyone who is reduced to
the remote profiling? Since this is the simplest way of using TPTP. I am
at a loss as to what are the next steps. Any help?
David
|
|
|
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93348 is a reply to message #93282] |
Mon, 12 March 2007 14:12 |
Asaf Yaffe Messages: 333 Registered: July 2009 |
Senior Member |
|
|
Hi David,
I have no problems launching Tomcat 5.5.20 for Windows with CGProf,
using (almost) the same method you did. One thing to note here is that
if you don't define any filters, then the amount of data generated
during Tomcat's boot will literally block Tomcat from loading.
Here's how I configured Tomcat to run the call-graph profiler (assume
Tomcat is installed in C:\Tomcat):
1. Opened the Tomcat Configuration dialog (Start Menu => All Programs =>
Apache Tomcat => Configure Tomcat)
2. Added the following text to the Java Options field in the Java page:
-agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilter.txt;CGProf
3. Verified that the Java Virtual Machine field points to a Java 5.0 JVM
(I assume that Java 6.0 will also work, but check the Tomcat documentation).
4. Created a text file named filter.txt in the Tomcat Working Path
(specified in the Startup page of the Configuration utility) and
specified the following filter:
org.apache.* * EXCLUDE
java.* * EXCLUDE
javax.* * EXCLUDE
sun.* * EXCLUDE
com.sun.* * EXCLUDE
ibm.* * EXCLUDE
* * INCLUDE
Basically, this will exclude all runtime classes from the monitoring. A
better filter would be to include only your webapp packages and exclude
the rest, for example:
com.mywebapp.* * INCLUDE
* * EXCLUDE
5. Opened a command prompt, defined the JVMTI Profiler environment
variables (JAVA_PROFILER_HOME and PATH, see documentation for details).
6. CD to <tomcat dir>\bin and launched tomcat5.exe
Tomcat started successfully and was fully operational. By default, the
trace log file (trace.trcxml) is generated in the Tomcat Working Path.
You can override this by using the file= argument of JPIAgent (again -
see documentation for details).
I hope this will help. Let me know.
Thanks,
Asaf
--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
|
|
|
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93729 is a reply to message #93348] |
Mon, 19 March 2007 18:31 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
Asaf Yaffe wrote:
> Hi David,
>
> I have no problems launching Tomcat 5.5.20 for Windows with CGProf,
> using (almost) the same method you did. One thing to note here is that
> if you don't define any filters, then the amount of data generated
> during Tomcat's boot will literally block Tomcat from loading.
>
> Here's how I configured Tomcat to run the call-graph profiler (assume
> Tomcat is installed in C:\Tomcat):
> 1. Opened the Tomcat Configuration dialog (Start Menu => All Programs =>
> Apache Tomcat => Configure Tomcat)
> 2. Added the following text to the Java Options field in the Java page:
> -agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilter.txt;CGProf
>
> 3. Verified that the Java Virtual Machine field points to a Java 5.0 JVM
> (I assume that Java 6.0 will also work, but check the Tomcat
> documentation).
> 4. Created a text file named filter.txt in the Tomcat Working Path
> (specified in the Startup page of the Configuration utility) and
> specified the following filter:
>
> org.apache.* * EXCLUDE
> java.* * EXCLUDE
> javax.* * EXCLUDE
> sun.* * EXCLUDE
> com.sun.* * EXCLUDE
> ibm.* * EXCLUDE
> * * INCLUDE
>
> Basically, this will exclude all runtime classes from the monitoring. A
> better filter would be to include only your webapp packages and exclude
> the rest, for example:
>
> com.mywebapp.* * INCLUDE
> * * EXCLUDE
>
> 5. Opened a command prompt, defined the JVMTI Profiler environment
> variables (JAVA_PROFILER_HOME and PATH, see documentation for details).
>
> 6. CD to <tomcat dir>\bin and launched tomcat5.exe
>
> Tomcat started successfully and was fully operational. By default, the
> trace log file (trace.trcxml) is generated in the Tomcat Working Path.
> You can override this by using the file= argument of JPIAgent (again -
> see documentation for details).
>
> I hope this will help. Let me know.
>
> Thanks,
> Asaf
>
Hi,
It has helped somewhat. But when I try to start Tomcat (using sysdeo
plugin, which allows JVM command line additions) I get
"Could not find the main class. Program will exit". So I know the JVMTI
agent is running at least.
The error, I assume, is because the line you specified as the additional
JVM arg above in 2.
-agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilter.txt;CGProf
does not include a start class name as specified in the "Profiling Java
Applications using the new Java Profiler in Eclipse TPTP 4.3" document.
I am not quite sure which class is required here?
Thx.
David
|
|
|
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93774 is a reply to message #93729] |
Tue, 20 March 2007 08:06 |
Asaf Yaffe Messages: 333 Registered: July 2009 |
Senior Member |
|
|
> Hi,
>
> It has helped somewhat. But when I try to start Tomcat (using sysdeo
> plugin, which allows JVM command line additions) I get
> "Could not find the main class. Program will exit". So I know the JVMTI
> agent is running at least.
>
> The error, I assume, is because the line you specified as the additional
> JVM arg above in 2.
> -agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilter.txt;CGProf
>
> does not include a start class name as specified in the "Profiling Java
> Applications using the new Java Profiler in Eclipse TPTP 4.3" document.
> I am not quite sure which class is required here?
>
> Thx.
>
> David
David,
I am not familiar with the sysdeo plugin, but I tried using it and I
also couldn't start Tomcat with the profiler. This seems like an
internal sysdeo issue.
You can use the alternative I already suggested in this discussion
thread, or you can wait just a little longer (2-4 weeks) until we
provide our WTP integration which will allow you to "profile on server"
with all servers supported by WTP (Tomcat among them).
HTH,
Asaf
--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
|
|
|
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93789 is a reply to message #93774] |
Tue, 20 March 2007 11:45 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
Asaf Yaffe wrote:
>> Hi,
>>
>> It has helped somewhat. But when I try to start Tomcat (using sysdeo
>> plugin, which allows JVM command line additions) I get
>> "Could not find the main class. Program will exit". So I know the
>> JVMTI agent is running at least.
>>
>> The error, I assume, is because the line you specified as the
>> additional JVM arg above in 2.
>> -agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilter.txt;CGProf
>>
>> does not include a start class name as specified in the "Profiling
>> Java Applications using the new Java Profiler in Eclipse TPTP 4.3"
>> document. I am not quite sure which class is required here?
>>
>> Thx.
>>
>> David
>
> David,
>
> I am not familiar with the sysdeo plugin, but I tried using it and I
> also couldn't start Tomcat with the profiler. This seems like an
> internal sysdeo issue.
>
> You can use the alternative I already suggested in this discussion
> thread, or you can wait just a little longer (2-4 weeks) until we
> provide our WTP integration which will allow you to "profile on server"
> with all servers supported by WTP (Tomcat among them).
>
> HTH,
> Asaf
>
I have tried the direct method too, as you outlined in your earlier
response. When I start Tomcat from the tomcat5w.exe after adding the
Java Options as below
-Djava.io.tmpdir=D:\Tomcat_5.5\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogMa nager
-Djava.util.logging.config.file=D:\Tomcat_5.5\conf\logging.p roperties
-agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilters.txt;HeapProf
And setting the Working path: on the Startup dialog to
"D:\Tomcat_5.5\work" and putting my filters.txt in that directory.
In the stderr log I got this
java.lang.NoClassDefFoundError: start
Exception in thread "main"
I have also reinstalled the new technology Agent Controller and the
plugin and the new Java Profiler Runtime package. I also tried running
it from the cmd prompt as tomcat5.exe with the same error as above,
java.lang.NoClassDefFoundError: start
Exception in thread "main"
appearing in the cmd window. Made sure I set the JAVA_PROFILER_HOME and
altered the path as specified.
Is there somethng missing in the instructions you gave? Shouldn't there
be a class name specified? As in the
"Java_Aplication_Profiling_using_TPTP-r4-3-new-v0.1.doc" document as so
java -agentlib:JPIBootLoader=JPIAgent
[:[help]|[<option>=<value>,...]];<profiler> <Java Class>
?
Thx.
David
|
|
| | |
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93831 is a reply to message #93817] |
Tue, 20 March 2007 15:26 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
david wrote:
> Hi,
>
> Yes tried that too.
>
> Here are the relevant parts of my environment
>
> JAVA_HOME=c:\Program Files\Java\jre1.5.0_11
> JAVA_PROFILER_HOME=D:\AgentController\plugins\org.eclipse.tp tp.javaprofiler
> Path=D:\AgentController\plugins\org.eclipse.tptp.javaprofile r;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;C:\WINNT \system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\PROGRA~1\ULTRAE ~1;c:\Program
> Files\Apache Software Foundation\Maven 1.0.2\bin;C:\Program
> Files\ZipGenius
> 6\;d:\jakartatools\jakarta-ant-1.5.1\bin;d:\gtk\2.0\bin;C:\P rogram
> Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL
> Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
> Server\90\Tools\binn\;C:\Program Files\Microsoft SQL
> Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft
> Visual Studio
> 8\Common7\IDE\PrivateAssemblies\;D:\AgentController\bin;c:\P rogram
> Files\Java\jre1.5.0_11\bin
> TPTP_AC_HOME=D:\AgentController
>
>
> I get this
>
> [2007-03-20 14:34:27] [410 javajni.c] [error] CreateJavaVM Failed
> [2007-03-20 14:34:27] [953 prunsrv.c] [error] Failed initializing java
> D:\Tomcat_5.5\bin\bootstrap.jar
> [2007-03-20 14:34:27] [1202 prunsrv.c] [error] ServiceStart returned 2
>
> In jakarta-service log
>
> Using the Java Option of
> " -agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=f ilters.txt;HeapProf "
>
>
> I have reinstalled Tomcat (5.5.23) as well just to be sure.
>
> I am really in difficulty, I tried hprof and it crashes part way through
> with an open trace file, leaving me with no way of finding my lingering
> objects.
>
> David
Hi,
Well I tried the Profiler4j project, which uses JVMTI, with the
identical setup, and it works. Shame it does not have the features
needed to identify lingering objects.
But does suggest there is something wrong with TPTP new technology agent
controller though, because it does not work. I think I have the setup
for it correct.
Any further suggestions?
David
|
|
|
Re: Sysdeo Tomcat plugin andf TPTP, do they work together? [message #93919 is a reply to message #93831] |
Thu, 22 March 2007 07:15 |
Asaf Yaffe Messages: 333 Registered: July 2009 |
Senior Member |
|
|
Hi David,
Lets take a step back here. Please try to launch HeapProf in
"standalone" mode, without Tomcat and see if it works. The readme file
has all the needed information. Here's a command line example for
running HeapProf on HelloWorld.class:
java -agentlib:JPIBootLoader=JPIAgent:server=standalone;HeapProf HelloWorld
If everything is OK, the HelloWorld application should run without
problem, and a file named trace.trcxml should be created in the current
directory.
Let me know if this works...
>
> But does suggest there is something wrong with TPTP new technology agent
> controller though, because it does not work. I think I have the setup
> for it correct.
>
Seems like a Setup issue to me, as I can successfully launch Tomcat with
the new JVMTI Profiler runtime.
HTH,
Asaf
--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
|
|
|
Goto Forum:
Current Time: Sun Sep 22 13:58:51 GMT 2024
Powered by FUDForum. Page generated in 0.05363 seconds
|