File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes connection pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connection pool" Watch "connection pool" New topic

connection pool

dhana logan

Joined: May 28, 2003
Posts: 1
I want to use connection pool in my servlet.
This is the error message i am getting-
"Error Message is:java.sql.SQLException: Cannot load JDBC driver class 'null'"
I have made necessary changes in web and server.xml..
<Resource name="jdbc/myoracle" auth="Container"
<ResourceParams name="jdbc/myoracle">
Here is my code..
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
Connection conn = ds.getConnection();
thanks in advance
Dave Jochim
Ranch Hand

Joined: Jan 08, 2003
Posts: 31
I'm not sure, but when you do the lookup with the context is it ... or without the leading slash before 'comp'?
Sorry I can't be more helpful.
I agree. Here's the link:
subject: connection pool
It's not a secret anymore!