I've used MySQL in just about every GWT app I've written, so it's
quite possible to use it.  Including during development running Jetty.

1: All JDBC calls MUST come from the server.  The client code can NOT
see any jar files, ever.

2: You can NOT reference com.mysql.jdbc.Driver, or any other package
that comes from a jar file, in any class that will end up in the
client.  It doesn't matter if that code is only called from the
server.  Any class that imports anything from a jar file (or from any
of the classes that aren't on the client use whitelist) MUST be in the
server package.

My guess is that you have one or more classes in *.shared that are
importing com.mysql.jdbc.Driver.  Move those classes to *.server, or
move all the MySQL functionality out of them and into classes that are
in *.server.

Greg

On Nov 30, 2:54 am, mgm <[email protected]> wrote:
> I am having the same issue.. I am using MySQL on the server side
> (server source package only) and there is the run-time error of:
>
>   java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
>
> I do have the mysql package (mysql-connector-java.jar) in the eclipse
> class path (in Project / Properties / Java Build Path) and still it
> does not work.
>
> Does anyone know how to configure correctly? perhaps there are other
> settings to make...
>
> thanks
> Gabor
>
> On Nov 5, 2:23 pm, Ross McKinnon <[email protected]> wrote:
>
> > Hi there,
>
> > I've spent numerous hours this week trying to get my existing GWT
> > application to connect with an existing MySQL database with no luck.
>
> > I've created my code to connect to the database using JDBC and is kept
> > in the server package to ensure it remains as java code.  Also i have
> > included the mySQL jar file in the build path for the project but
> > still get an error
>
> > java.lang.ClassNotFoundException:com.mysql.jdbc.Driver...
>
> > I have tried numerous ways of getting the database and have ran out of
> > ideas now so thought I would consult the experts to see if any kind
> > person can lend a hang..
>
> > Thanks for any help,
>
> > Ross

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

Reply via email to