Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why the following error occured in tomcat application?

 
bhaskar sanghi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why the following error occured in tomcat application?

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
' for connect URL 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:780)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
40)
at com.bob.hrms.DBUtil.getConnection(DBUtil.java:21)
at com.bob.hrms.master.RetClientMasterInfo.doGet(RetClientMasterInfo.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:773)
... 29 more
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't look like your DataSource is configured correctly. Did you want to paste the settings and some (small) sample code showing how you're calling it?

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic