Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot create PoolableConnectionFactory

 
Yati Tan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic