> From: Craig Dunn [mailto:[EMAIL PROTECTED] > Subject: Null datasource trying to connect to JNDI connection. > > In my server.xml:
The usual comment: don't put <Context> elements in server.xml; doc reference: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html > factory="org.apache.commons.dbcp.BasicDataSourceFactory" Did you see a factory attribute in any of the Tomcat doc for JDBC DataSources? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.h tml > Context initCtx = new InitialContext(); > Context envCtx = (Context) initCtx.lookup("java:comp/env"); > DataSource ds = (DataSource)envCtx.lookup("jdbc/myDB"); Did you follow the above Tomcat doc and put a <resource-ref> in your WEB-INF/web.xml file? > Also, I have put the following jar's into $CATALINA_HOME/lib on the > advice of other threads; > commons-pool-1.3.jar > commons-dbcp-1.2.2.jar Read the Tomcat doc first, then use "other threads" for clarification, if needed. You won't see any mention of adding the above jars to Tomcat's lib directory, since Tomcat already has its own versions. > jtds-1.2.jar That one you need. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]