Thanks for the replies. I've currently solved the problem by disabling "Use Google App Engine". After that i got other exceptions which i managed to solve by removing certain jar files out of the Build Path manually (relating to Google App Engine).
On 2 Jul., 02:59, mdwarne <mike.wa...@gmail.com> wrote: > Are you trying to load the driver in the Server Code, or in the > Client? > You can not connect to a database from the Client Code (Browser > javascript), only from the Server code. > > I am using MySql in my projects using RPC (Servlet). > > In my RPC servlet I have code like this that works fine.... > > public Connection getConnection() throws Exception { > Class.forName("com.mysql.jdbc.Driver").newInstance(); > Connection c = DriverManager.getConnection("jdbc:mysql://"+host > +"/"+db, > login, passw); > return c; > > } > > Mike. > > On Jun 30, 4:41 am, Hotkey <henrik.brinkm...@googlemail.com> wrote: > > > > > 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.