tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Tomcat classpath not set at boot
Date Sat, 14 Jun 2003 00:25:53 GMT
Tomcat ignores system CLASSPATH at startup and creates its own.


Chad Lemmen wrote:
> I've got Tomcat 4.1.24 starting at boot on my Linux box with a script in
> /etc/rc.d/init.d.  The script looks like this
> #!/bin/sh
> JAVA_HOME=/usr/java
> export JAVA_HOME
> /opt/jakarta-tomcat-4.1.24/bin/
> Tomcat is starting at boot and seems to work fine http://localhost:8080
> brings up the default Tomcat home page.  The only thing that doesn't seem
> to be working is my classpaths that I set in the file are not
> being set.  If I start Tomcat from the command line my classpaths are
> being read and my servlet works, but when starting Tomcat at boot my
> classpaths don't seem to be set because when I try to run my servlet I get
> "java.lang.NoClassDefFoundError"
> I don't get this error when Tomcat is started from the command line.  Why
> would starting it at boot time not use my user set classpaths?
> Here is the portion of that I added my classpath to.
> # Add on extra jar files to CLASSPATH
> if [ -n "$JSSE_HOME" ]; then
> CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:
> "$JSSE_HOME"/lib/jsse.jar
> fi
> CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:
> /opt/EspressReport/lib/ReportAPIWithChart.jar:
> /opt/EspressReport/lib/ExportLib.jar
> I also tried adding the two jar files ReportAPIWithChart.jar and
> ExportLib.jar to CATALINA_HOME/shared/lib
> Both methods work and my classpaths are set and my servlet works, but only
> if Tomcat is started from the command line "CATALINA_HOME/bin/".
> Why doesn't this work when starting at boot?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message