Skip site navigation (1) Skip section navigation (2)

Re: jdbc works with java programs. not with tomcat.

From: "Andrew B(dot) Luck" <abluck(at)yahoo(dot)com>
To: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: jdbc works with java programs. not with tomcat.
Date: 2001-04-13 17:49:27
Message-ID: 014e01c0c442$15b8c490$0300a8c0@abluck (view raw or whole thread)
Lists: pgsql-jdbc
Hi Brett,

Thank you for the help.  I still haven't made much progress.  tomcat and
postgresql were already installed on this computer when it was supplied to
me.  unfortunately, i'm pretty much on my own now...

> I recommend using the shell scripts provided with Tomcat to start and shut
> it down.  Also, there is no need to place & at the end of 'tomcat stop'.

- i didn't intend to be ambiguous.  i've been using 'tomcat stop' (no '&').
- i tried to stop tomcat with the script... '/etc/rc.d/init.d/tomcat stop'.
no luck.

i was able to find a script '/etc/rc.d/init.d/tomcat'.  perhaps this is the
script i should use?  i'll include the contents...

# Startup script for Tomcat, the Apache Servlet Engine
# chkconfig: 345 80 20
# description: Tomcat is the Apache Servlet Engine
# processname: tomcat
# pidfile: /var/run/
# Gomez Henri <hgomez(at)slib(dot)fr>
# version 1.02 - Removed initlog support
# version 1.03 - Removed config:
# version 1.04 - tomcat will start before httpd and stop after httpd
# Source function library.
. /etc/rc.d/init.d/functions

export JAVA_HOME=/usr/local/java
export TOMCAT_HOME=/var/tomcat

export PATH=$PATH:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin

# See how we were called.
case "$1" in
 echo -n "Starting tomcat: "
 touch /var/run/
 chown apache:apache /var/run/
 daemon --user apache tomcat start
 touch /var/lock/subsys/tomcat
 echo -n "Shutting down tomcat: "
 daemon tomcat stop
 rm -f /var/lock/subsys/tomcat
 rm -f /var/run/
 $0 stop
 sleep 2
 $0 start
 echo "Usage: $0 {start|stop|restart}"
 exit 1

exit 0

> As for the CLASSPATH tomcat searches, if you use and
> provided with Tomcat, it lists the classpath Tomcat is using
> before Tomcat starts up.  You can add custom classpaths to the script or
> add to the system classpath.
i wasn't able to those files anywhere on the computer.  am i insane or just

> Most likely, there should be a link (probably something like S##postgres)
> under /etc/rc.d/rc3 that points back to the main startup script, which
> should start up PostgreSQL upon bootup.  What version of Linux are you
> using?
- i was able to find the directory, but not the file.  can you help me find
the main startup script?
- i've got red had version 7.

Thank you again for the help & i apologize for my abundance of ignorance.


Do You Yahoo!?
Get your free address at

In response to


pgsql-jdbc by date

Next:From: Brett W. McCoyDate: 2001-04-13 18:36:20
Subject: Re: jdbc works with java programs. not with tomcat.
Previous:From: Raghunath TDate: 2001-04-13 11:39:34
Subject: FW: Re: jdbc works with java programs. not with tomcat.

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group