2 shengdong76 shengdong76 于 2014.05.12 16:19 提问

JDBC连接数据库,求大神帮解决啊,我怎么也解决不了了。。。

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at cpu.hrms.dao.DatabaseDao.getConnection(DatabaseDao.java:29)
at cpu.hrms.dao.impl.IEmployeeImpl.isLogin(IEmployeeImpl.java:31)
at cpu.hrms.control.DoLogin.doPost(DoLogin.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)

我使用的是Eclipse,也引入了classes12.jar包,尝试过ojdbc14.jar包,可还是不行啊。。。

3个回答

vs_youbang
vs_youbang   2014.05.12 21:41

这是驱动没找到啊,看driver路径有没有写错。jar包放在lib下

a714115852
a714115852   2014.05.12 23:09

贴完整代码出来 不然不知道错误

u013415968
u013415968   2014.05.15 19:08

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
导错了位置吧

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!