tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Datasource Error
Date Wed, 08 Aug 2007 13:26:13 GMT
Hash: SHA1


Will Holmes wrote:
>   I had no problems with the project when I was using Netbeans 5.5 as my IDE
> but I had to convert my project to work with Websphere development studio
> and that is when I encountered the error below.  I believe the error is
> somewhere with my Tomcat setup.  I thought maybe there might be some bugs
> with Tomcat 5.5.9.  

If you're worried about bugs in 5.5.9, why not upgrade to 5.5.23 (the
latest in that line)?

The error you describe is common, and the problem is usually something
super small in the configuration. I recommend removing all of your
<Resource> configuration for this datasource entirely. Then, read the
Tomcat 5.5 JNDI DataSource Howto
particularly the MySQL Example section "2. server.xml". Take the
<Resource> element example they use, but put it in your
META-INF/context.xml file -- NOT in the server.xml file, as the HOWTO

(I'm not entirely sure why the JNDI HOWTO contradicts what everyone on
the list preaches about leaving webapp-specific configuration out of the
server.xml file.)

You shouldn't need anything for a JNDI DataSource except these two things:

1. Your JDBC driver JAR file in WEB-INF/lib in your WAR FILE
   (unless you are having Tomcat manage your realm, in which case
    you need that JAR file to be in $CATALINA_HOME/common/lib).
2. A META-INF/context.xml file containing a <Resource> element
   with the proper settings. See the aforementioned example.

- -chris

Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message