开发者

com.mysql.jdbc.Driver ClassNotFoundException

I'm getting ClassNotFoundException on Class.forname("com.mysql.jdbc.D开发者_如何学Criver") I'm using Windows Vista 64-bit, Eclipse Galileo, GWT framework. I downloaded mysql-connector-java-5.1.6-bin, but what is the exact path I should put this file in? I'm getting this exception while I'm in gwt-projects, but in normal projects it works good. Any idea how that should be done?


Finally its worked, the problem was not in the classpath, but from the .jar file itself, im using mysql-connector-java-5.1.6-bin which was not working, but when i tried mysql-connector-java-3.0.17-ga-bin everything works good, i hope to fix the new version soon anyway thanks BalusC for helping :)


Just put the JAR file in the runtime classpath of the application in question.

In case of a Servlet based webapplication, you normally put it in /WEB-INF/lib folder. It's by default covered by the webapp's runtime classpath.


Disable Google App Engine. Its a setting in Eclipse.

Google App Engine doesn't allow you to open Sockets. When you try to load the JDBC driver, it makes a socket connection in a static block. An exception in the static block leads to a ClassNotFoundException, which is what you are seeing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜