You are not logged in.

#1 2011-12-13 16:57:11

rickeyski
Member
Registered: 2011-01-27
Posts: 25

[SOLVED] Any one work with Tomcat?

I thought this was a better place for this than the apps forum, apologies if I'm wrong.  I am trying to write a simple servlet to connect to mysql.  However, no matter where I place the mysql jdbc jar file, I get a tomcat error, database driver not found for jdbc:mysql.  I can connect fine from desktop apps.  The mysql jar is in the /usr/share/tomcat7/lib dir as well as directly bundled with my war file.  Thanks in advance.

edit::Adding the db jars to the $JAVA_HOME/jre/lib/ext allowed tomcat to find them

Last edited by rickeyski (2011-12-14 04:06:24)

Offline

#2 2011-12-13 17:38:43

i_love_penguins
Member
From: Germany
Registered: 2010-03-30
Posts: 46
Website

Re: [SOLVED] Any one work with Tomcat?

Try putting the mysql jar into the WEB-INF/lib directory of your application. Tomcat should discover it automatically.

Also see http://tomcat.apache.org/tomcat-7.0-doc … howto.html. Maybe that helps, too.

Last edited by i_love_penguins (2011-12-13 17:42:19)

Offline

#3 2011-12-13 19:36:38

rickeyski
Member
Registered: 2011-01-27
Posts: 25

Re: [SOLVED] Any one work with Tomcat?

Thanks, I will try in the java/lib/ext.  By bundled in the war file, I meant I had the jar in WEB-INF/lib, and tomcat still didnt find it.

Offline

Board footer

Powered by FluxBB