Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Xerces problem when profiling Tomcat
Xerces problem when profiling Tomcat [message #116440] Mon, 29 October 2007 10:07 Go to next message
Eclipse UserFriend
Originally posted by: svileng.gmail.com

Hello,

I'm tryng to profile a web application running on Tomcat 5.5.20 using
AgentController 4.4.0.0.

What is happening exactly is when I start the tomcat server with
"-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf" It starts to some
point and then error message like this is displayed:
"[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see
log file).]".

This message is not very informative so I turned on MARTINI logger with
debug level.
What I saw at the end of the log file was like this:

Informative 10/29/07 09:48:42 4740 5 CJVMTIInterface ClassPrepare event
received: class = 'Lorg/apache/xerces/impl/xs/XMLSchemaValidator;',
generic = '(null)'
Error 10/29/07 09:48:42 4740 0 CDataManager File: DataManager.cpp (Line:
1568) condition failed: uiJVMPIMethodIndex < uiJVMPINumMethods

So I assumed that this is related to a problem during instrumentation of
xerces distribution I use with Tomcat (I just have a xercesImpl.jar in
<tomcat_dir>\common\lib). Removing xerces is not an option of course.

I looked up at the agent controller documentation an discovered that there
is filtering of which classes to be included/excluded but It doesn't seems
to work. I've placed filters.txt in the tomcat/bin directory (which should
be the current working dir) but I'm still getting the same error.

Anyway, according the documentation, the filter should be available only
to "standalone" mode and I really would like to use "enabled" mode.

Makes me wonder hasn't anybody profiled and application using xerces ,
because I wasn't able to find anything on the subject over the internet.

I have this problem for several days now and Its driving me crazy.

Please help!
Re: Xerces problem when profiling Tomcat [message #116693 is a reply to message #116440] Tue, 30 October 2007 00:20 Go to previous messageGo to next message
Chris Elford is currently offline Chris ElfordFriend
Messages: 9
Registered: July 2009
Junior Member
Can you share your filters.txt file?

I have profiled things with xerces before but not things with multiple
versions of xerces.

Thx,
Chris
Re: Xerces problem when profiling Tomcat [message #116730 is a reply to message #116693] Tue, 30 October 2007 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: svileng.gmail.com

Hi Chris,

Hmm, perhaps I didn't make myself clear - I'm using single version of
xerces(2.5.0 to be precise) not multiple...And It's located in
<tocmat_dir>\common\lib
As for the filters.txt here It is, I just copied It from
<Agent_Controller_install_dir>\Resources\filters.txt:

java* * EXCLUDE
sun* * EXCLUDE
com.sun.* * EXCLUDE
com.ibm.* * EXCLUDE
org.eclipse.* * EXCLUDE
org.apache.* * EXCLUDE
org.w3c.* * EXCLUDE
org.xml.* * EXCLUDE
javax.xml.parsers.* * EXCLUDE

Thanks,
Svilen
Re: Xerces problem when profiling Tomcat [message #116754 is a reply to message #116440] Tue, 30 October 2007 18:34 Go to previous messageGo to next message
Chris Elford is currently offline Chris ElfordFriend
Messages: 9
Registered: July 2009
Junior Member
I have tested some simple apps that enable schema validation with Xerces
2.5.0 and see no issues. I've run in both enabled and standalone mode
without filtering out xerces... My trcxml file reports that it is
successfully loaded/instrumented. It works for me with both TPTP 4.4.0
and 4.4.0.3.
...
<classDef name="org/apache/xerces/impl/xs/XMLSchemaValidator"
sourceName="&lt;Unknown&gt;" classId="541" time="1193768184.783088731"/>
<methodDef name="-clinit-" signature="()V" startLineNumber="0"
endLineNumber="0" methodId="71665" classIdRef="541"/>
<methodEntry threadIdRef="3" time="1193768184.783149354"
methodIdRef="71665" classIdRef="541" ticket="119071" stackDepth="8"/>
<methodExit threadIdRef="3" methodIdRef="71665" classIdRef="541"
ticket="119071" time="1193768184.783217519"/>
...

set TPTP_AC_HOME=C:\utils\eclipseAC440
set
JAVA_PROFILER_HOME=C:\utils\eclipseAC440\plugins\org.eclipse .tptp.javaprofiler
set PATH=%PATH%;%JAVA_PROFILER_HOME%;%TPTP_AC_HOME%\bin

set JVM=C:\java\sun50_09_jre\bin\java
set CLASSPATH=xercesImpl.jar;xercesSamples.jar

%JVM% %AGENT% sax.Counter -s data/personal.xml

where agent is set to one of the following three options:

set AGENT=-agentlib:JPIBootLoader=JPIAgent:server=standalone;CGP rof
set AGENT=-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf
set
AGENT=-agentlib:JPIBootLoader=JPIAgent:server=standalone;CGP rof:execdetails=true

With verbose Martini, I get log messages of the form:
Informative 10/30/07 18:29:03 2452 5 CJVMTIInterface ClassPrepare event
received: class = 'Lorg/apache/xerces/xni/parser/XMLInputSource;', generic
= '(null)'
Informative 10/30/07 18:29:03 2452 5 CJVMTIInterface [ClassFileLoadHookHandler]
org/apache/xerces/impl/xs/XMLSchemaValidator
I

I do not see the errors that you have.

the md5sum of my Xerces impl jar (binary release from Apache) is
17c7b058d32d6df45456e1728a299ba1 *xercesImpl.jar
Re: Xerces problem when profiling Tomcat [message #116854 is a reply to message #116440] Wed, 31 October 2007 10:49 Go to previous message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
Svilen Genchev wrote:
> Hello,
>
> I'm tryng to profile a web application running on Tomcat 5.5.20 using
> AgentController 4.4.0.0.
>
> What is happening exactly is when I start the tomcat server with
> "-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf" It starts to
> some point and then error message like this is displayed:
> "[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see
> log file).]".
>
> This message is not very informative so I turned on MARTINI logger with
> debug level. What I saw at the end of the log file was like this:
>
> Informative 10/29/07 09:48:42 4740 5 CJVMTIInterface
> ClassPrepare event received: class =
> 'Lorg/apache/xerces/impl/xs/XMLSchemaValidator;', generic = '(null)'
> Error 10/29/07 09:48:42 4740 0 CDataManager File:
> DataManager.cpp (Line: 1568) condition failed: uiJVMPIMethodIndex <
> uiJVMPINumMethods
>
> So I assumed that this is related to a problem during instrumentation of
> xerces distribution I use with Tomcat (I just have a xercesImpl.jar in
> <tomcat_dir>\common\lib). Removing xerces is not an option of course.

This seems like a bug in JVMTI Runtime. Please open a Bugzilla for the
TPTP Project, Profiler component at http://bugs.eclipse.org/bugs

Make sure to include this information in the bug details, along with the
OS, Eclipse, TPTP and Java versions you are using.

Thanks,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Previous Topic:How to get more info...
Next Topic:EclipseCon 2008: 2 1/2 weeks remaining to propose a talk or tutorial!
Goto Forum:
  


Current Time: Thu Apr 25 08:06:47 GMT 2024

Powered by FUDForum. Page generated in 0.03249 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top