tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edson Alves Pereira <eapere...@panamericano.com.br>
Subject RE: Multiple webapps talking to same DB
Date Thu, 06 Nov 2003 14:32:50 GMT
	If you want to create a default database for all web-apps ( i don´t
known if you want the same database´s user also ), you should add a JNDI
datasource in <GlobalNamingResources>, try to use tomcat´s manager. Remeber,
you must put your JDBC driver in common/lib also, because tomcat need it to
create the datasource, but in your case, maybe you did try a simple
connection and forgot to put JDBC driver in shared/lib or WEB-INF/lib.

> ----------
> De: 	KKolle@gkservices.com[SMTP:KKolle@gkservices.com]
> Responder: 	Tomcat Users List
> Enviada: 	quinta-feira, 6 de novembro de 2003 10:22
> Para: 	tomcat-user@jakarta.apache.org
> Assunto: 	Multiple webapps talking to same DB
> 
> Version of Tomcat - 4.1.24
> OS - WinXP (development workstation)
> DB - MySQL 4.0.13
> 
> I currently have a single webapp (test1) that can connect to the database
> and
> perform DB operations just fine. This uses JSP, Servlets and JDBC.
> What I want to do is have other webapps connect to the same database. Here
> is
> what I did:
> 1. I copied my existing webapp, <tomcat_home>\webapps\test1 and created
> <tomcat_home>\webapps\test2.
> 2. I restarted tomcat and when invoking the test2 webapp, I get the
> following
> error: java.sql.SQLException: Cannot load JDBC driver class 'null'
>     This error happens when I call the getConnection() method on the
> DataSource
> object.
> 
> I believe I don't have the correct configuration in the server.xml for the
> webapp, test2. I tried several different ways to try and get this to work,
> but
> those have
> failed so far.
> 
> So, when making a straight copy of one webapp like I did above, what would
> need
> to change in the server.xml (in the MySQL section) to get this to work?
> Or, would the culprit be some other configuration?
> 
> Thanks for any help on this,
> Kevin
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message