Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Problem profiling Tomcat web application that uses Crypto API with EclipseProfiler
Problem profiling Tomcat web application that uses Crypto API with EclipseProfiler [message #127082] Fri, 12 December 2003 18:25 Go to next message
Eclipse UserFriend
Originally posted by: dockerysean.hotmail.com

Hello,

I am using the following configuration:

Sun Java SDK 1.4.2, Standard Edition
Red Hat Linux 9 (Shrike)
Eclipse 2.1.2
Sysdeo Tomcat Launcher 2.20
EclipseProfiler 0.5.30

I have a medium sized web application which I am trying to profile. The
web application contains a third party library provided as a JAR file
(no source). The third party library validates a local license file
(license is tied to the machine) using the crypto APIs.

When I start Tomcat using the Sysdeo Tomcat Launcher, the following
command line is used (obtained through right-clicking/Properties on the
Process):

/j2sdk1.4.2/bin/java
-Dcatalina.home=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
-Djava.endorsed.dirs=/home/developer/bin/jakarta-tomcat-4.1. 29-LE-jdk14/common/endorsed
-Dcatalina.base=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
-Djava.io.tmpdir=/home/developer/bin/jakarta-tomcat-4.1.29-L E-jdk14/temp
-classpath
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/bin/boots trap.jar:/j2sdk1.4.2/lib/tools.jar
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:90 84
org.apache.catalina.startup.Bootstrap start -config
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/conf/serv er.xml

In this case, everything works perfectly. I can set debug breakpoints
in Eclipse and so forth...

I used the "Create a Launch configuration" button from
Windows/Preferences/Tomcat/JVM Settings. I then copied as many of the
elements as I could from the Java Application launch configuration that
was created to a newly created Profiler launch configuration (with which
I hope to profile the application).

Here is the command line that is being executed when I run the Profiler
launch configuration using the debugger:

/j2sdk1.4.2/bin/java -Djava.home=/j2sdk1.4.2/jre
-Dcatalina.home=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
-Djava.endorsed.dirs=/home/developer/bin/jakarta-tomcat-4.1. 29-LE-jdk14/common/endorsed
-Dcatalina.base=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
-Djava.io.tmpdir=/home/developer/bin/jakarta-tomcat-4.1.29-L E-jdk14/temp
-XrunProfilerDLL:769,0,0 -D__PROFILER_AUTO_START=0
-D__PROFILER_TIMING_METHOD=0
-D__PROFILER_PACKAGE_FILTER=__A__org.apache.catalina.startup .Bootstrap:__M__java.:__M__javax.:__M__sun.:__M__com.sun.:__ M__org.apache.:__M__org.xml.
-D__PROFILER_WAIT_FRONTEND_CONNECT=1 -D__PROFILER_METHOD_KEEP_MODE=0
-D__PROFILER_INSTRUMENT_SYSTEM_CLASSES=0
-Xbootclasspath:/j2sdk1.4.2/jre/lib/rt.jar:/home/developer/b in/eclipse2/plugins/ru.nlmk.eclipse.plugins.profiler/jakarta -regexp.jar:/home/developer/bin/eclipse2/plugins/ru.nlmk.ecl ipse.plugins.profiler/commons-lang.jar:/home/developer/bin/e clipse2/plugins/ru.nlmk.eclipse.plugins.profiler/profiler_tr ace.jar
-classpath
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/bin/boots trap.jar:/j2sdk1.4.2/lib/tools.jar
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:69 04
org.apache.catalina.startup.Bootstrap start -config
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/conf/serv er.xml

The significant difference between the command lines is the use of
/Xbootclasspath in the latter version.

In the latter case, I am able to start Tomcat and the EclipseProfiler
starts collecting samples, but when I "ant install" my web application,
the application startup fails during the third party license check
with the following exception message:

Algorithm PBEWithMD5AndDES not available

I am certain that this exception occurs in one of the following two
calls that are made from within the third party library...

SecretKeyFactory.getInstance("PBEWithMD5AndDES");

Cipher cipher = Cipher.getInstance("PBEWithMD5AndDES");

....which indicates that Sun's JCE implementation is unavailable for some
reason (which I of course don't understand yet).

Note that this problem also occurs even when I launch the Profiler
configuration in Run mode (instead of Debug mode).

Questions:

1) I'm not familiar with what bootclasspath means to the JVM. Can
someone explain what the difference between classpath and bootclasspath is?

2) How can I determine what the bootclasspath is for a standard JVM
invocation of a Java application? That is, what is the default value of
bootclasspath when it isn't specified?

3) I have never had need to use the crypto APIs myself, so I'm not sure
why the getInstance is failing. If I assume that it is failing because
there is some registration that happens in a static block or through a
property file somewhere, how do I ensure that registration happens in
the case of a profiled application?

4) Has anyone seen this problem before? What was your solution?

The installation of EclipseProfiler made me a little nervous with the
installation of a specific DLL/SO in the JRE bin folder, but it seems to
work fine for the simple Java applications I created to test it.

I was also unable to get JMechanic to launch Tomcat successfully on
Linux; whenever I attempted to launch Tomcat, the console showed
complaints about invalid hprof parameters.

Should I be trying to use Hyades instead? Or should I breakdown and get
my boss to purchase something like Quest's JProbe? Instrumenting
methods in the application with log statements to measure the
performance of various methods is unrealistic; there are over 400
classes in the request handling portion of the application.

Thanks for your time.
Re: Problem profiling Tomcat web application that uses Crypto API with EclipseProfiler [message #127532 is a reply to message #127082] Mon, 15 December 2003 11:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: usenet.sbdconsultants.com

Is there a better group in which to post this message?

"Sean Dockery" <dockerysean@hotmail.com> wrote in message
news:3FDA4E4C.8070909@hotmail.com...
> Hello,
>
> I am using the following configuration:
>
> Sun Java SDK 1.4.2, Standard Edition
> Red Hat Linux 9 (Shrike)
> Eclipse 2.1.2
> Sysdeo Tomcat Launcher 2.20
> EclipseProfiler 0.5.30
>
> I have a medium sized web application which I am trying to profile. The
> web application contains a third party library provided as a JAR file
> (no source). The third party library validates a local license file
> (license is tied to the machine) using the crypto APIs.
>
> When I start Tomcat using the Sysdeo Tomcat Launcher, the following
> command line is used (obtained through right-clicking/Properties on the
> Process):
>
> /j2sdk1.4.2/bin/java
> -Dcatalina.home=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
> -Djava.endorsed.dirs=/home/developer/bin/jakarta-tomcat-4.1. 29-LE-jdk14/co
mmon/endorsed
> -Dcatalina.base=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
> -Djava.io.tmpdir=/home/developer/bin/jakarta-tomcat-4.1.29-L E-jdk14/temp
> -classpath
>
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/bin/boots trap.jar:/j2sdk1
..4.2/lib/tools.jar
> -Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:90 84
> org.apache.catalina.startup.Bootstrap start -config
> /home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/conf/serv er.xml
>
> In this case, everything works perfectly. I can set debug breakpoints
> in Eclipse and so forth...
>
> I used the "Create a Launch configuration" button from
> Windows/Preferences/Tomcat/JVM Settings. I then copied as many of the
> elements as I could from the Java Application launch configuration that
> was created to a newly created Profiler launch configuration (with which
> I hope to profile the application).
>
> Here is the command line that is being executed when I run the Profiler
> launch configuration using the debugger:
>
> /j2sdk1.4.2/bin/java -Djava.home=/j2sdk1.4.2/jre
> -Dcatalina.home=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
> -Djava.endorsed.dirs=/home/developer/bin/jakarta-tomcat-4.1. 29-LE-jdk14/co
mmon/endorsed
> -Dcatalina.base=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
> -Djava.io.tmpdir=/home/developer/bin/jakarta-tomcat-4.1.29-L E-jdk14/temp
> -XrunProfilerDLL:769,0,0 -D__PROFILER_AUTO_START=0
> -D__PROFILER_TIMING_METHOD=0
> -D__PROFILER_PACKAGE_FILTER=__A__org.apache.catalina.startup .Bootstrap:__M
__java.:__M__javax.:__M__sun.:__M__com.sun.:__M__org.apache. :__M__org.xml.
> -D__PROFILER_WAIT_FRONTEND_CONNECT=1 -D__PROFILER_METHOD_KEEP_MODE=0
> -D__PROFILER_INSTRUMENT_SYSTEM_CLASSES=0
> -Xbootclasspath:/j2sdk1.4.2/jre/lib/rt.jar:/home/developer/b in/eclipse2/pl
ugins/ru.nlmk.eclipse.plugins.profiler/jakarta-regexp.jar:/h ome/developer/bi
n/eclipse2/plugins/ru.nlmk.eclipse.plugins.profiler/commons- lang.jar:/home/d
eveloper/bin/eclipse2/plugins/ru.nlmk.eclipse.plugins.profil er/profiler_trac
e.jar
> -classpath
>
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/bin/boots trap.jar:/j2sdk1
..4.2/lib/tools.jar
> -Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:69 04
> org.apache.catalina.startup.Bootstrap start -config
> /home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/conf/serv er.xml
>
> The significant difference between the command lines is the use of
> /Xbootclasspath in the latter version.
>
> In the latter case, I am able to start Tomcat and the EclipseProfiler
> starts collecting samples, but when I "ant install" my web application,
> the application startup fails during the third party license check
> with the following exception message:
>
> Algorithm PBEWithMD5AndDES not available
>
> I am certain that this exception occurs in one of the following two
> calls that are made from within the third party library...
>
> SecretKeyFactory.getInstance("PBEWithMD5AndDES");
>
> Cipher cipher = Cipher.getInstance("PBEWithMD5AndDES");
>
> ...which indicates that Sun's JCE implementation is unavailable for some
> reason (which I of course don't understand yet).
>
> Note that this problem also occurs even when I launch the Profiler
> configuration in Run mode (instead of Debug mode).
>
> Questions:
>
> 1) I'm not familiar with what bootclasspath means to the JVM. Can
> someone explain what the difference between classpath and bootclasspath
is?
>
> 2) How can I determine what the bootclasspath is for a standard JVM
> invocation of a Java application? That is, what is the default value of
> bootclasspath when it isn't specified?
>
> 3) I have never had need to use the crypto APIs myself, so I'm not sure
> why the getInstance is failing. If I assume that it is failing because
> there is some registration that happens in a static block or through a
> property file somewhere, how do I ensure that registration happens in
> the case of a profiled application?
>
> 4) Has anyone seen this problem before? What was your solution?
>
> The installation of EclipseProfiler made me a little nervous with the
> installation of a specific DLL/SO in the JRE bin folder, but it seems to
> work fine for the simple Java applications I created to test it.
>
> I was also unable to get JMechanic to launch Tomcat successfully on
> Linux; whenever I attempted to launch Tomcat, the console showed
> complaints about invalid hprof parameters.
>
> Should I be trying to use Hyades instead? Or should I breakdown and get
> my boss to purchase something like Quest's JProbe? Instrumenting
> methods in the application with log statements to measure the
> performance of various methods is unrealistic; there are over 400
> classes in the request handling portion of the application.
>
> Thanks for your time.
>
Re: Problem profiling Tomcat web application that uses Crypto API with EclipseProfiler [message #127558 is a reply to message #127532] Mon, 15 December 2003 12:11 Go to previous messageGo to next message
Eclipse UserFriend
I believe you are hitting the following problem
https://bugs.eclipse.org/bugs/show_bug.cgi?id=44406 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=38370

There are workarounds described and the problem is fixed in the latest
milestone build of Eclipse (M5)

HTH
Darins

"Sean Dockery" <usenet@sbdconsultants.com> wrote in message
news:brkp16$sov$1@eclipse.org...
> Is there a better group in which to post this message?
>
> "Sean Dockery" <dockerysean@hotmail.com> wrote in message
> news:3FDA4E4C.8070909@hotmail.com...
> > Hello,
> >
> > I am using the following configuration:
> >
> > Sun Java SDK 1.4.2, Standard Edition
> > Red Hat Linux 9 (Shrike)
> > Eclipse 2.1.2
> > Sysdeo Tomcat Launcher 2.20
> > EclipseProfiler 0.5.30
> >
> > I have a medium sized web application which I am trying to profile. The
> > web application contains a third party library provided as a JAR file
> > (no source). The third party library validates a local license file
> > (license is tied to the machine) using the crypto APIs.
> >
> > When I start Tomcat using the Sysdeo Tomcat Launcher, the following
> > command line is used (obtained through right-clicking/Properties on the
> > Process):
> >
> > /j2sdk1.4.2/bin/java
> > -Dcatalina.home=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
>
> -Djava.endorsed.dirs=/home/developer/bin/jakarta-tomcat-4.1. 29-LE-jdk14/co
> mmon/endorsed
> > -Dcatalina.base=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
> > -Djava.io.tmpdir=/home/developer/bin/jakarta-tomcat-4.1.29-L E-jdk14/temp
> > -classpath
> >
>
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/bin/boots trap.jar:/j2sdk1
> .4.2/lib/tools.jar
> > -Xdebug -Xnoagent -Djava.compiler=NONE
> > -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:90 84
> > org.apache.catalina.startup.Bootstrap start -config
> > /home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/conf/serv er.xml
> >
> > In this case, everything works perfectly. I can set debug breakpoints
> > in Eclipse and so forth...
> >
> > I used the "Create a Launch configuration" button from
> > Windows/Preferences/Tomcat/JVM Settings. I then copied as many of the
> > elements as I could from the Java Application launch configuration that
> > was created to a newly created Profiler launch configuration (with which
> > I hope to profile the application).
> >
> > Here is the command line that is being executed when I run the Profiler
> > launch configuration using the debugger:
> >
> > /j2sdk1.4.2/bin/java -Djava.home=/j2sdk1.4.2/jre
> > -Dcatalina.home=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
>
> -Djava.endorsed.dirs=/home/developer/bin/jakarta-tomcat-4.1. 29-LE-jdk14/co
> mmon/endorsed
> > -Dcatalina.base=/home/developer/bin/jakarta-tomcat-4.1.29-LE -jdk14
> > -Djava.io.tmpdir=/home/developer/bin/jakarta-tomcat-4.1.29-L E-jdk14/temp
> > -XrunProfilerDLL:769,0,0 -D__PROFILER_AUTO_START=0
> > -D__PROFILER_TIMING_METHOD=0
>
> -D__PROFILER_PACKAGE_FILTER=__A__org.apache.catalina.startup .Bootstrap:__M
> __java.:__M__javax.:__M__sun.:__M__com.sun.:__M__org.apache. :__M__org.xml.
> > -D__PROFILER_WAIT_FRONTEND_CONNECT=1 -D__PROFILER_METHOD_KEEP_MODE=0
> > -D__PROFILER_INSTRUMENT_SYSTEM_CLASSES=0
>
> -Xbootclasspath:/j2sdk1.4.2/jre/lib/rt.jar:/home/developer/b in/eclipse2/pl
>
ugins/ru.nlmk.eclipse.plugins.profiler/jakarta-regexp.jar:/h ome/developer/bi
>
n/eclipse2/plugins/ru.nlmk.eclipse.plugins.profiler/commons- lang.jar:/home/d
>
eveloper/bin/eclipse2/plugins/ru.nlmk.eclipse.plugins.profil er/profiler_trac
> e.jar
> > -classpath
> >
>
/home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/bin/boots trap.jar:/j2sdk1
> .4.2/lib/tools.jar
> > -Xdebug -Xnoagent -Djava.compiler=NONE
> > -Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:69 04
> > org.apache.catalina.startup.Bootstrap start -config
> > /home/developer/bin/jakarta-tomcat-4.1.29-LE-jdk14/conf/serv er.xml
> >
> > The significant difference between the command lines is the use of
> > /Xbootclasspath in the latter version.
> >
> > In the latter case, I am able to start Tomcat and the EclipseProfiler
> > starts collecting samples, but when I "ant install" my web application,
> > the application startup fails during the third party license check
> > with the following exception message:
> >
> > Algorithm PBEWithMD5AndDES not available
> >
> > I am certain that this exception occurs in one of the following two
> > calls that are made from within the third party library...
> >
> > SecretKeyFactory.getInstance("PBEWithMD5AndDES");
> >
> > Cipher cipher = Cipher.getInstance("PBEWithMD5AndDES");
> >
> > ...which indicates that Sun's JCE implementation is unavailable for some
> > reason (which I of course don't understand yet).
> >
> > Note that this problem also occurs even when I launch the Profiler
> > configuration in Run mode (instead of Debug mode).
> >
> > Questions:
> >
> > 1) I'm not familiar with what bootclasspath means to the JVM. Can
> > someone explain what the difference between classpath and bootclasspath
> is?
> >
> > 2) How can I determine what the bootclasspath is for a standard JVM
> > invocation of a Java application? That is, what is the default value of
> > bootclasspath when it isn't specified?
> >
> > 3) I have never had need to use the crypto APIs myself, so I'm not sure
> > why the getInstance is failing. If I assume that it is failing because
> > there is some registration that happens in a static block or through a
> > property file somewhere, how do I ensure that registration happens in
> > the case of a profiled application?
> >
> > 4) Has anyone seen this problem before? What was your solution?
> >
> > The installation of EclipseProfiler made me a little nervous with the
> > installation of a specific DLL/SO in the JRE bin folder, but it seems to
> > work fine for the simple Java applications I created to test it.
> >
> > I was also unable to get JMechanic to launch Tomcat successfully on
> > Linux; whenever I attempted to launch Tomcat, the console showed
> > complaints about invalid hprof parameters.
> >
> > Should I be trying to use Hyades instead? Or should I breakdown and get
> > my boss to purchase something like Quest's JProbe? Instrumenting
> > methods in the application with log statements to measure the
> > performance of various methods is unrealistic; there are over 400
> > classes in the request handling portion of the application.
> >
> > Thanks for your time.
> >
>
>
Re: Problem profiling Tomcat web application that uses Crypto API with EclipseProfiler [message #127774 is a reply to message #127558] Tue, 16 December 2003 02:39 Go to previous message
Eclipse UserFriend
Originally posted by: usenet.sbdconsultants.com

Cool! I attempted the workaround and everything worked great on both
Windows and Linux!

I would like to move to Eclipse 3 M5 (liking the new refactorings), but some
of the plug-ins that I use everyday haven't been updated to support Eclipse
3 M5 yet.

Thanks for the help. I hope I can return the favour in the future.


"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
news:brkpsg$tmr$1@eclipse.org...
> I believe you are hitting the following problem
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=44406 and
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=38370
>
> There are workarounds described and the problem is fixed in the latest
> milestone build of Eclipse (M5)
>
> HTH
> Darins
Previous Topic:Simple Eclipse/Ant/JAR question
Next Topic:Why can not show current run location when debug?
Goto Forum:
  


Current Time: Mon Apr 28 02:34:55 EDT 2025

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

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

Back to the top