当前位置: 技术问答>java相关
想请教一下win2k+apache+resin+mysql的配置问题,mysql怎么连不上?(急)
来源: 互联网 发布时间:2015-05-14
本文导语: 我发现resin的lib内已经默认包含了jdbc-mysql.jar,就没有再下载jdbc驱动,找了一个测试程序。结果错误提示如下: 500 Servlet Exception java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at com.caucho.util.DynamicClassLoader.loadClass(Dyna...
我发现resin的lib内已经默认包含了jdbc-mysql.jar,就没有再下载jdbc驱动,找了一个测试程序。结果错误提示如下:
500 Servlet Exception
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:479)
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 _test_0mysql__jsp._jspService(/test_mysql.jsp:9)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:176)
at com.caucho.server.http.Invocation.service(Invocation.java:278)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:847)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
测试程序如下:
windows XP JSP-JDBC-MySQL测试 - Select
a:link {font:9pt/12pt 宋体, MS Song; color:red}
a:visited {font:9pt/12pt 宋体, MS Song; color:#4e4e4e}
td { FONT-SIZE: 9pt;}
主机地址
用户名
密码
拜托各位!!!!
500 Servlet Exception
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:479)
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 _test_0mysql__jsp._jspService(/test_mysql.jsp:9)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:176)
at com.caucho.server.http.Invocation.service(Invocation.java:278)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:847)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
测试程序如下:
windows XP JSP-JDBC-MySQL测试 - Select
a:link {font:9pt/12pt 宋体, MS Song; color:red}
a:visited {font:9pt/12pt 宋体, MS Song; color:#4e4e4e}
td { FONT-SIZE: 9pt;}
主机地址
用户名
密码
拜托各位!!!!
|
在 classpath 中添加 resinlibjdbc-mysql.jar
|
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
提示没找到jdbc for mysql的driver
设置好classpath咯,象dylanwolf() 说的那样,不过路径要设置成绝对路径
提示没找到jdbc for mysql的driver
设置好classpath咯,象dylanwolf() 说的那样,不过路径要设置成绝对路径