当前位置: 技术问答>java相关
这种方法为什么连不上MYSQL数据库?
来源: 互联网 发布时间:2015-11-03
本文导语: 执行结果: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:530) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)...
执行结果:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:530)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at _seedb__jsp._jspService(/seedb.jsp:12)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:312)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:484)
|
我前天从前安装也是这样子的.是没有把MYSQL.DRIVER加入到CLASSPATH目录.加入后.就可以访问了.