jQuery in Action, 2nd edition*
The moose likes Tomcat and the fly likes Cannot create PoolableConnectionFactory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Cannot create PoolableConnectionFactory " Watch "Cannot create PoolableConnectionFactory " New topic
Author

Cannot create PoolableConnectionFactory

Yati Tan
Ranch Hand

Joined: May 28, 2005
Posts: 56
Hi,

I am facing this problem in my Sevlet code.

Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/hr");
Connection conn = ds.getConnection();


Cannot create PoolableConnectionFactory (No more data to read from socket)
I am using tOmcat 6.

When I write normal,
conn = DriverManager.getConnection("jdbcracle:thin:@127.0.0.1:1521", "hr", "hr");

Its working, but not the one with JNDI. Pls help..


SCJP 1.4<br />SCJA 1.0<br />SCWCD 1.4
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cannot create PoolableConnectionFactory
 
Similar Threads
error: Cannot load JDBC driver class
Missing something creating a DataSource, MySql 5.0, MyEclipse 6.5, Tomcat 6
Sybase datasource without metadata
question about DBCP example
Can I create connection pooling with data sources using sybase driver(jconn2.jar)?