tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Shand <>
Subject JNDI DataSource problems..
Date Thu, 27 Feb 2003 21:48:07 GMT
I've set up a JNDI DataSource by following the instructions in the 
tomcat docs how-to.
The good news is that everything works fine when the application is 


When trying to run some tests we've written, we get the following error:

javax.naming.NoInitialContextException: Need to specify class name in 
environment or system property, or as an applet parameter, or in an 
application resource file...

The tests are not being run in the servlet environment so I'm guessing 
this is where my problem is. My servlet tests which access the same 
database code work fine. Presumably because they are running inside the 

I don't know enough about JNDI to work this out. I would have thought 
that a resource which is set up by the servlet container ( tomcat ) 
would be available outside the container?

Any help or pointers would be greatly appreciated.

MySql 4
Connector/J 3 jdbc driver
Tomcat 4.1.18

Steven Shand

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message