Now I'm getting a NoClassDefFoundException when I try
to run my echo JSP:
sun.tools.javac.Main
(It used to work.)
I see that this class is contained in my
JAVA_HOME/lib/tools.jar. I also see from a Google
search that lots of folks have had problems with this.
The easy fix is to modify the CLASSPATH, but where to
do it?
I'm running Tomcat 4.0.6 as a Windows service. A
Google search turned up a script that showed me how to
do it:
@echo off
if "%OS%"=="Windows_NT" setlocal
set SERVICE_NAME=Apache-Tomcat-4.0.6
set JAVA_HOME=C:\Tools\JDKs
set
TOMCAT_HOME=C:\Tools\jakarta-tomcat-4.0.6-LE-jdk14
set
BOOTSTRAP_SERVICE=org.apache.catalina.startup.BootstrapService
set STDOUT=%TOMCAT_HOME%\logs\stdout.log
set STDERR=%TOMCAT_HOME%\logs\stderr.log
echo Service name: %SERVICE_NAME%
echo Java HOME : %JAVA_HOME%
echo Tomcat HOME : %TOMCAT_HOME%
echo Bootstrap : %BOOTSTRAP_SERVICE%
echo Output log : %STDOUT%
echo Error log : %STDERR%
tomcat.exe -install %SERVICE_NAME%
%JAVA_HOME%\jre\bin\client\jvm.dll -server -Xms64m
-Xmx256m
-Djava.class.path=%TOMCAT_HOME%\bin\bootstrap.jar
-Dcatalina.home=%TOMCAT_HOME%
-Djava.endorsed.dirs=%TOMCAT_HOME%\common\endorsed
-start %BOOTSTRAP_SERVICE% -params start -stop
%BOOTSTRAP_SERVICE% -params stop -out %STDOUT% -err
%STDERR%
if "%OS%"=="Windows_NT" endlocal
But now that I examine that script a little more
closely, I see that I don't have any -classpath
arguments passed to the tomcat.exe. Typing tomcat
-help didn't reveal any CLASSPATH info.
Why isn't Tomcat picking up my tools.jar anymore?
This gets worse by the minute! I knew how to run
Tomcat this morning! ;) - MOD
--- Michael Duffy <[EMAIL PROTECTED]> wrote:
>
> Thank you so much for your wise counsel. Your idiom
> has now become mine.
>
> I'm going through very carefully and trying to make
> sure that everything is set up properly with my
> apps.
> I've stripped my Tomcat installation down to just
> the
> JARs that Jakarta put in the common/lib, and I'm
> rearranging all my apps to put all the JARs they
> need
> in their WARs. I've increased debug to 99.
>
> I'll let you know how I make out once I have more
> data. Thank you. Sincerely, MOD
>
>
> --- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> >
> > Howdy,
> >
> > >"...Definitely NOT using common/lib, shared/lib,
> > and
> > >other shared repositories. Disk space is cheap.
> > Your
> > >time diagnosing classloader issues related to the
> > >common repositories is expensive..." - so true.
> > >
> > >Even for JDBC JARs?
> >
> > Yes. I'm pretty strict about keeping webapp
> > container-independent and
> > self-contained, so I use DBCP myself within my
> > webapp rather than
> > tomcat's built-in DBCP support. Therefore I don't
> > put anything in
> > server.xml to configure connection pools. Then
> the
> > JDBC driver jar
> > doesn't need to be in common/lib, instead it's in
> > WEB-INF/lib. This has
> > been valuable many times, and in fact we deploy to
> a
> > heterogeneous
> > server environment without recompilation OR
> > repackaging: same WAR.
> >
> > I'm a huge fan of tomcat, obviously. But I'm not
> a
> > big fan at all of
> > any shared/common classloader repositories in
> > servlet containers. They
> > invariably cause more problems than solutions ;)
> >
> > Yoav Shapira
> >
> >
> >
> > This e-mail, including any attachments, is a
> > confidential business communication, and may
> contain
> > information that is confidential, proprietary
> and/or
> > privileged. This e-mail is intended only for the
> > individual(s) to whom it is addressed, and may not
> > be saved, copied, printed, disclosed or used by
> > anyone else. If you are not the(an) intended
> > recipient, please immediately delete this e-mail
> > from your computer system and notify the sender.
> > Thank you.
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
> http://shopping.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]