You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by michel <co...@videotron.ca> on 2009/02/07 02:50:47 UTC
Running Derby on Tomcat
Hi,
I've been trying to get Derby running on Tomcat with no luck. When I try to
get a java server page to connect it keeps telling me that it can't find the derby client driver. I start Tomcat with this:
#!/bin/sh
JAVA_HOME=/lib/sun-jdk-1.5.0
JAVA_OPTS="-server"
CATALINA_HOME=/share/tomcat-5.5.14
CATALINA_BASE=$(cd $(dirname $0)/.. && pwd)
CATALINA_PID=$CATALINA_BASE/logs/catalina.pid
export JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_BASE CATALINA_PID
$CATALINA_HOME/bin/catalina.sh $(basename $0)
export DERBY_INSTALL=/home/qsys/derby
export DERBY_HOME=/home/qsys/derby
export CLASSPATH=$CLASSPATH:$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbyclient.jar:$DERBY_INSTALL/lib/derbytools.jar:.
I can run the following and work with derby with simmilar code as the above (I added $DERBY_INSTALL/lib/derbyclient.jar to Tomcat start script):
export DERBY_INSTALL=/home/qsys/derby
export DERBY_HOME=/home/qsys/derby
export CLASSPATH=$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbytools.jar:.
/home/qsys/derby/bin/setEmbeddedCP
java org.apache.derby.tools.sysinfo
java org.apache.derby.tools.ij
so the classpath is correct. Is there an obvious stupid mistake in how I am setting the classpath?
Re: Running Derby on Tomcat
Posted by michel <co...@videotron.ca>.
Chuck,
I will do that and thanks!
----- Original Message -----
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Friday, February 06, 2009 9:30 PM
Subject: RE: Running Derby on Tomcat
> From: michel [mailto:compukat@videotron.ca]
> Subject: Re: Running Derby on Tomcat
>
> I am using the default tomcat for my hosting
If by "default Tomcat" you mean a 3rd-party repackaged one, then I strongly
advise getting rid of it and installing a real one from tomcat.apache.org.
The repackaged versions do not follow the standard Tomcat setup and
frequently cause all kinds of problems, both subtle and overt.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Running Derby on Tomcat
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: michel [mailto:compukat@videotron.ca]
> Subject: Re: Running Derby on Tomcat
>
> I am using the default tomcat for my hosting
If by "default Tomcat" you mean a 3rd-party repackaged one, then I strongly advise getting rid of it and installing a real one from tomcat.apache.org. The repackaged versions do not follow the standard Tomcat setup and frequently cause all kinds of problems, both subtle and overt.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running Derby on Tomcat
Posted by michel <co...@videotron.ca>.
Chuck,
Thanks! I am using the default tomcat for my hosting and it has the
classpath in the default startup. I am wondering if that isn't a reason for
all the weird problems.
Thanks again!
----- Original Message -----
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Friday, February 06, 2009 9:07 PM
Subject: RE: Running Derby on Tomcat
> From: michel [mailto:compukat@videotron.ca]
> Subject: Running Derby on Tomcat
>
> export
> CLASSPATH=$CLASSPATH:$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTA
> LL/lib/derbyclient.jar:$DERBY_INSTALL/lib/derbytools.jar:.
Don't ever, ever, ever set CLASSTPATH for use with Tomcat. Any jars needed
by your webapp should be in the webapp's WEB-INF/lib directory, or Tomcat's
shared/lib directory. Follow the instructions on the Derby web pages:
http://db.apache.org/derby/integrate/DerbyTomcat5512JPetStor.html
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Running Derby on Tomcat
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: michel [mailto:compukat@videotron.ca]
> Subject: Running Derby on Tomcat
>
> export
> CLASSPATH=$CLASSPATH:$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTA
> LL/lib/derbyclient.jar:$DERBY_INSTALL/lib/derbytools.jar:.
Don't ever, ever, ever set CLASSTPATH for use with Tomcat. Any jars needed by your webapp should be in the webapp's WEB-INF/lib directory, or Tomcat's shared/lib directory. Follow the instructions on the Derby web pages:
http://db.apache.org/derby/integrate/DerbyTomcat5512JPetStor.html
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org