Wednesday, June 30, 2010

JDBC org.gjt.mm.mysql.Driver : Classnotfound

Dear All,

this is my first post in this group, hopefully i'm not doing anything
wrong. I've searched for this topic but didn't found any solution.

I'm quity new to GWT and are currently writing my first Client/Server
example. Actually i want to read some Data from a database but i
didn't get the connection to work.

At the source
"Class.forName("org.gjt.mm.mysql.Driver").newInstance();" a
ClassNotFoundException is thrown.

I'm using Eclipse and have tried the following:
Project Properties -> Java Build Path -> Libraries -> Add External Jar

Result: still ClassNotFoundException

Manually Copied the file into the WEB-INF\lib directory.

Result:
ExceptionInInitializerError at the line: this.conn =
DriverManager.getConnection("<my connection string>"):

Caused by: java.lang.ExceptionInInitializerError
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
282)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at
com.setlog.gwt.servicetest.server.db.DBInterface.<init>(DBInterface.java:
69)


Hopefully someone can help me with this

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment