aspose file tools*
The moose likes Tomcat and the fly likes Cannot create JDBC driver of class '' for connect URL 'null' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Cannot create JDBC driver of class Watch "Cannot create JDBC driver of class New topic
Author

Cannot create JDBC driver of class '' for connect URL 'null'

sanjay yadav yadav
Greenhorn

Joined: May 05, 2008
Posts: 9
Hi all,
I am using JNDI in tomcat to cannect with database. when i execute the application, i am getting Exception like

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

at the line 1

Context initContext = new InitialContext();
Context envCtx = (Context) initContext.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("jdbc/WareHouse");
if(ds!=null){
System.out.println("3333");
con = ds.getConnection(); //1
}

Please help.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

sanjay yadav yadav wrote:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

Problem with the JNDI binding, the problem with "driver" class name and db URL, please check if the are not EMPTY, also googling will yields more results,
Meanwhile How you're binding DB resource (JNDI code) ?

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Cannot create JDBC driver of class '' for connect URL 'null'
 
Similar Threads
struts 1.3 Data base connection pool
JNDI Connection Pool Problem
Connecting to database in Tomcat 5.5
Tomcat's Datasource
Can't get connection from DataSource object