Dear Tomcat Users,

 

I am using Tomcat 4 and trying to use JNDI to connect to a data source
and environment variables.  I get the following when trying to access
the InitialContext via

DataSource ds = (DataSource)initialContext.lookup(
"java:comp/env/jdbc/mydb" );

 

javax.naming.NameNotFoundException: Name comp is not bound in this
Context

 

I have read all the documentation many times and cannot see what I am
doing wrong.  The server.xml seems to be fine; I can see the appropriate
context entries in the tomcat manager application.  But for some reason
the comp namespace does not seem to get set up; basically Tomcat doesn't
do what the documentation says it should.

 

Has anybody encountered this type of situation before and found a
solution?

 

Thanks

Tony

Reply via email to