java.lang.classnotfoundexception:com.mysql.jdbc.driver错误不断

agyaoht7  于 2021-06-23  发布在  Mysql
关注(0)|答案(1)|浏览(292)

我已经将jar文件添加到lib文件夹中,并与类路径链接,但仍然得到错误消息
java.lang.classnotfoundexception:com.mysql.jdbc.driver位于org.apache.catalina.loader.webappclassloaderbase.loadeClass(webappclassloaderbase)。java:1928)在org.apache.catalina.loader.webappclassloaderbase.loadeclass(webappclassloaderbase。java:1771)位于java.lang.class.forname0(本机方法)的java.lang.class.forname(未知源代码)的注册.doget(注册。java:32)在javax.servlet.http.httpservlet.service(httpservlet。java:624)在javax.servlet.http.httpservlet.service(httpservlet。java:731)位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:303)在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:208)在org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter。java:52)位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:241)在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:208)在org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve。java:219)在org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve。java:110)在org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase。java:498)在org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve。java:169)在org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve。java:103)在org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve。java:1025)在org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve。java:116)在org.apache.catalina.connector.coyoteadapter.service(coyoteadapter。java:445)在org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor。java:1139)在org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(抽象协议)。java:637)在org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint。java:318)位于java.util.concurrent.threadpoolexecutor.runworker(未知源),位于java.util.concurrent.threadpoolexecutor$worker.run(未知源)org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(任务线程。java:61)位于java.lang.thread.run(未知源代码)
我使用eclipse作为ide,mysql作为mysql工作台的db

cvxl0en2

cvxl0en21#

你想连接什么样的数据库,是mysql吗?
如果是这样,你需要使用 Class.forName("com.**mysql**.jdbc.Driver");

相关问题