Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 58210 invoked from network); 16 Jun 2003 01:04:17 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 16 Jun 2003 01:04:17 -0000 Received: (qmail 21229 invoked by uid 97); 16 Jun 2003 01:06:42 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 21222 invoked from network); 16 Jun 2003 01:06:41 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 16 Jun 2003 01:06:41 -0000 Received: (qmail 56621 invoked by uid 500); 16 Jun 2003 01:04:01 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 56608 invoked from network); 16 Jun 2003 01:04:00 -0000 Received: from bdsl.66.13.200.206.gte.net (HELO naboo.lemmen.com) (66.13.200.206) by daedalus.apache.org with SMTP; 16 Jun 2003 01:04:00 -0000 Received: from localhost (chad@localhost) by naboo.lemmen.com (8.9.3/8.9.3) with ESMTP id UAA27457 for ; Sun, 15 Jun 2003 20:17:36 -0400 Date: Sun, 15 Jun 2003 20:17:36 -0400 (EDT) From: Chad Lemmen To: Tomcat Users List Subject: Re: Tomcat classpath not set at boot In-Reply-To: <3EEB2270.6000209@joedog.org> Message-ID: References: <3EEA6B91.3070609@joedog.org> <3EEB2270.6000209@joedog.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I've done some more testing and it doesn't have anything to do with starting Tomcat at boot as I first thought. The problem is that my servlet tries to connect to the X server when run. I have no idea why it needs to connect to the X server (It's a servlet that EspressReport wrote to connect to a database and generate a report.), but anyway this seems to be the problem. In order to get my servlet to work I need to do 'xhost + localhost' before Tomcat is started. I'm starting Tomcat as root and root is not allowed to connect to screen :0 by default since my user name owns it. I think if I started Tomcat with my user name and not root it would work, however, for some reason I can't start Tomcat this way. When I start Tomcat as a normal user it starts fine and ps -ef shows the java processes started by Tomcat, but after about 3 seconds all the processes quit and Tomcat is no longer running. Anyone have any idea why this would happen? As root Tomcat continues to run. On Sat, 14 Jun 2003, Tim Funk wrote: > Is it just your servlet that doesn't work, or all servlets? (and jsps) > Are you using different userids when run from boot time vs command line? > What happens if your startup command is moved to inittab? (Or other wacky > equivalent) > > -Tim > > Chad Lemmen wrote: > > It's not a system CLASSPATH I have set. I put the jar files I want in the > > CLASSPATH in $CATALINA_HOME/shared/lib. Tomcat does recognize these if I > > start Tomcat manually, but not if I have Tomcat staring at boot time with > > the script in /etc/rc.d/init.d > > > > On Fri, 13 Jun 2003, Tim Funk wrote: > > > > > >>Tomcat ignores system CLASSPATH at startup and creates its own. > >> > >>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html > >> > >>-Tim > >> > >>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/startup.sh > >>> > >>> > >>>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 catalina.sh 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 catalina.sh 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/startup.sh". > >>>Why doesn't this work when starting at boot? > >>> > >>>--------------------------------------------------------------------- > >>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > >>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > >>> > >>> > >> > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > >> > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org