tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: DB connection error -Tomcat 6 config
Date Thu, 18 Mar 2010 22:04:38 GMT
Tried it Bob.

Same errors in both of those attempts.

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

-----Original Message-----
From: Bob Hall [mailto:rfhall3@yahoo.com]
Sent: Thursday, March 18, 2010 4:27 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config


> 
> SEVERE: Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
>     at org.apache.naming.NamingContext.lookup(NamingContext.java:770)


Have you tried:

66: Connection connection = null;
67: Context initCtx = new InitialContext();
68: Context envCtx = (Context) initCtx.lookup("java:comp/env");
69: // Look up our data source
70: DataSource ds = (DataSource) initCtx.lookup("java:/myoracle");

   OR

70: DataSource ds = (DataSource) initCtx.lookup("java:jdbc/myoracle");


- Bob


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message