troubleshooting Question

Tomcat 5.5 jdbc connection pooling error

Avatar of MobileTodd
MobileToddFlag for Canada asked on
Java App Servers
1 Comment1 Solution593 ViewsLast Modified:
I am trying to setup a global jdbc connection pool on Tomcat 5.5.16. I configured $CATALINA_HOME/conf/server.xml in Tomcat's ADMIN console. I connect to jdbc connection pool from standalone Java application DataSourceTestTomcat that is not deployed to the webserver.

In DataSourceTestTomcat, I get an exception at Context envCtx = (Context)initCtx.lookup("java:comp/env");

javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at javax.naming.InitialContext.lookup(Unknown Source)
at DataSourceTestTomcat.ConnectDataSource(DataSourceTestTomcat.java:38)
at DataSourceTestTomcat.main(DataSourceTestTomcat.java:16)

I have attached DataSourceTestTomcat.java and server.xml sources

DataSourceTestTomcat console application, in classpath:
  rt.jar
  commons-logging-1.1.1.jar
  naming-factory.jar
  naming-resources.jar
---------------------------
server.xml is located in $CATALINA_HOME/conf/server.xml

DataSourceTestTomcat.java.txt
server.xml.txt
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros