In tomcat 4.0.3 even i faced the same problem, in which i was getting DataSource = null. Then when i upgraded to TC 4.1.7, i got the DataSource object. Why dont you also upgrade and see.
-----Original Message----- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 10:58 AM To: 'Tomcat Users List' Subject: RE: JNDI and/or pooling help (long post) Thanks for the reply. I've changed my server.xml Resource object to match yours (aside from things like username, etc) and still no luck. As far as I can tell, the Context lookup is working, but when I execute this line of code, I get nothing (null): DataSource ds = null; ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MyTestDB"); I'm at a loss as to explain what's going on. There's nothing in any of the log files, erverything looks great. I just can't get a valid DataSource object, which means I can't get a connection. Does anyone have any thoughts on what might be going on? This is very frustrating...I can't even tell if it's a problem with my tomcat configuration, my servlet code, the driver, whatever...there aren't any error messages, just null. John Turner [EMAIL PROTECTED] -----Original Message----- From: Andrew Conrad [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 7:15 PM To: 'Tomcat Users List' Subject: RE: JNDI and/or pooling help (long post) Also, check your URL. The syntax is also UserName (case-insensitive) Here's my working resource: <ResourceParams name="jdbc/DataStorage"> <parameter> <name>url</name> <value>jdbc:microsoft:sqlserver://localhost:1433</value> </parameter> <parameter> <name>validationQuery</name> <value>select * from organizations</value> </parameter> <parameter> <name>maxIdle</name> <value>2</value> </parameter> <parameter> <name>maxActive</name> <value>10</value> </parameter> <parameter> <name>driverClassName</name> <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> </parameter> <parameter> <name>maxWait</name> <value>5000</value> </parameter> <parameter> <name>username</name> <value>Andrew</value> </parameter> <parameter> <name>password</name> <value>12345</value> </parameter> </ResourceParams> Then, once I get the DataSource, then the connection, I do a setCatalog() to define the correct DB. - Andrew -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>