Hi Shiri,
I tried this on my machine with the Tomcat server and it worked fine. I only got your error message when I removed the bin directory of the Agent Controller (i.e. the directory that contains piAgent.dll) from my system PATH.
All right so let's try and debug your problem:
I'm assuming you downloaded the Agent Controller and you followed the instructions in the Getting Started guide to set it up (http://www.eclipse.org/tptp/home/downloads/installguide/agentcontroller_42/win_ia32/getting_started.html). I'm also assuming you're running on Windows.
You should have included the bin directory of the Agent Controller in your PATH by going in Window's Control Panel -> System -> switched to the Advanced tab -> Click on Environment Variable -> under System Variables, find the PATH variable (or create it if it doesn't already exist) -> include the bin director of the Agent Controller in it (e.g. D:\AgentController\bin) -> Restart Eclipse, your Server and the Agent Controller.
One way you can check to see whether the bin directory of the Agent Controller is included in your PATH is by running a simple Java application in enabled mode and profiling it. Here's how to do that:
- Start the Agent Controller
- From the command prompt, run a simple Java application in enabled mode this way:
java -XrunpiAgent:server=enabled MySimpleJavaClass
- Switch to the Workbench -> click on the profile button -> select 'Profile...' -> create a new 'Attach - java process' launch configuration -> select localhost:10002 under the Host tab -> Click on Test Connection (You should see a message saying that the test was successful) -> switch to the Agents tab -> you should see an Agent here that you can select (this is the agent that was created when you ran 'MySimpleJavaClass' in enabled mode) -> You should be able to select this agent and click on the profile button.
If you don't see your agent, it means that the piAgent.dll wasn't found by the RAC (i.e. it's not included in your system PATH properly).
If you do see your agent, try killing all java processes and restarting Eclipse, the server and the RAC and try profiling on server again. If this doesn't work, it's probably because the server is overwriting your system PATH. Look into the configuration of your server and make sure it's not overwriting your system PATH.
Thanks,
Navid Mehregani
"Shiri Dori"
<[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 05/10/2006 09:29 AM
|
|
Hi Navid,
Thanks for your responses. The screencast was indeed helpful.
I’ve progressed a few more steps in the right direction – I’ve reconfigured my server to launch through WTP rather than the original Tomcat plugin we had. The server itself works OK – not so for the server profiler. Now, I can click on “profile” for the server and it attempts to profile, but I get the following error message:
“Error occurred during initialization of VM
Could not find agent library on the library path or in the local directory: piAgent”
This seems to be connected to the JVMPI agent that you mentioned, but although the piAgent.dll exists in the directory, and the directory is set as a PATH environment variable, it does not seem to pick it up.
I also tried manually adding the JVM argument of –Xrun, etc, but the result remained the same.
Any help would be greatly appreciated. A google search showed me that someone else ran into this same problem back in July (with Tomcat, specifically), and asked here, but eventually gave up…
Thanks,
-Shiri
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Navid Mehregani
Sent: Tuesday, October 03, 2006 7:10 PM
To: TPTP Tracing and Profiling Tools Project developer discussions
Subject: RE: [tptp-tracing-profiling-tools-dev]Problems withProfiler installation
Hi Shiri,
Here's the link to the screencast: http://www.eclipse.org/tptp/home/documents/tutorials/viewlets/v4.1/WTP/WTP_TPTP_viewlet_viewlet_swf.html
Note that you don't need the JVMTI agent to profile on server. (i.e. You don't need to download the New Java Profiler under the 'Technology Preview' section). Instead you can use the JVMPI agent included with the Agent Controller.
I agree that our download page is a bit confusing. This has been brought up before and we're working on simplifying it.
Thanks,
Navid Mehregani
"Shiri Dori" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 03/10/2006 08:07 AM
|
|
Hi Navid,
What screencast are you referring to? I did not receive any attachment or link.
I feel silly for asking for more help, but installing EMF/XSD did not end my troubles with the profiler.
Now, the profiler is willing to profile simple programs, but fails when launching the server profile on the Tomcat app.
Going back to the installations page I noticed the following plugins listed:
· Eclipse Web Tools Platform (WTP) 1.5.1 - (optional) required by profile on server feature
· Java EMF Model (JEM) SDK 1.2 - (optional) required by profile on server feature
However, even after installing them I get the following error message:
“The JVMTI agent org.eclipse.tptp.jvmti is not available. Make sure that the agent’s libraries are available and that it is configured properly.”
However, a closer look at my plugin folder shows that it indeed contains all the jvmti client files from the zip. But these do not include an org.eclipse.tptp.jvmti Jar, rather, it contains two other jars - org.eclipse.tptp.platform.jvmti.client, and org.eclipse.tptp.trace.jvmti.client . A check on the JVMTI runtime also seems to indicate that it was installed properly in the agent controller library, as specified.
Phew! Definitely makes me want to get the aforementioned update manager, as Harm suggested. (Any handy links?)
Thanks once again,
-Shiri
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Navid Mehregani
Sent: Thursday, September 28, 2006 5:36 PM
To: TPTP Tracing and Profiling Tools Project developer discussions
Subject: Re: [tptp-tracing-profiling-tools-dev] Problems withProfiler installation
Hi Shiri,
Here's what you need to profile a tomcat server app:
- Under 'TPTP Runtime and SDK' section, download TPTP runtime (All) [Looks like you already downloaded this]
- Under 'Agent Controller' or 'New technology Agent Controller' section, download the Agent Controller for Windows IA32 [Looks like you already downloaded this]
- Under 'Requirements' section, you'll need both Eclipse SDK 3.2.0 and EMF and XSD packages. [You probably already have Eclipse SDK 3.2.0, I'm not sure about EMF and XSD though]
> Possible reasons include the duplicity of the agent controller files – as I mentioned, a close look at the downloads page shows that both old and new agent controllers point to the same zip file.
Yes, the new Agent Controller replaced the old one for Windows IA32. This is why their links are the same.
Here's a screencast that gives an introductory overview of how you can profile a tomcat server application.
Regards,
Navid Mehregani
Problem Determination Tools
(905) 413-3664 | [EMAIL PROTECTED]
PWA: D2-152
"Shiri Dori" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 28/09/2006 04:49 AM
|
|
Hi,
I’m trying to run the Java Profiler in my Eclipse environment (v3.2) to
profile a tomcat server app. I have a WinXP machine.
I’ve followed the instructions on these pages:
http://www.eclipse.org/tptp/platform/documents/tutorials/jvmti/Java_Application_Profiling_using_TPTP-v2.0.html
http://www.eclipse.org/tptp/home/downloads/installguide/agentcontroller_42/win_ia32/getting_started.html
Starting from the TPTP 4.2.0.2 installation page (http://www.eclipse.org/tptp/home/downloads/drops/TPTP-4.2.0.2.html),
I installed the following components:
-TPTP runtime (“All”)
-New technology Agent Controller (which, for an unexplained reason,
points to the same file as the “old” agent controller). Also ran the
batch file as specified.
-JVMTI client
-JVMTI runtime – in the agent controller folder, as specified.
I also manage to run the agent controller from the command line.
However, when it came to configuring the profiler inside eclipse, I got
in trouble – my preferences do not show a “Profiling and Logging” option
as described on the Profiling page (http://www.eclipse.org/tptp/platform/documents/tutorials/jvmti/Java_Application_Profiling_using_TPTP-v2.0.html).
Possible reasons include the duplicity of the agent controller files –
as I mentioned, a close look at the downloads page shows that both old
and new agent controllers point to the same zip file.
Also, I got a slightly odd log message (included below) in AC, though I’m
not sure if it related.
Any clue on how to get this running would be greatly appreciated.
Thanks,
-Shiri
_______________________________________________
tptp-tracing-profiling-tools-dev mailing list
tptp-tracing-profiling-tools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev_______________________________________________
tptp-tracing-profiling-tools-dev mailing list
tptp-tracing-profiling-tools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev
_______________________________________________ tptp-tracing-profiling-tools-dev mailing list tptp-tracing-profiling-tools-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev