java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

357 views
Skip to first unread message

aki

unread,
Jul 4, 2008, 6:59:19 PM7/4/08
to Google Web Toolkit
Hello,
I'm making simple registration form in GWT. Registration data shold be
stored in DB. I made RPC call to the server where i implemented
connection to MySQL and few queries. When I run my application,
everything work fine until i call RPC. I got exception
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on server
side.
I'm programing in eclipse and had added external jar mysql-connector-
java-5.1.6-bin.jar in build path so it should work. I tried to make
simple java application in same way and this worked fine. Should I in
GWT do some more steps than mentioned?

Thanx in advance
--
Daniel

gregor

unread,
Jul 7, 2008, 11:53:33 AM7/7/08
to Google Web Toolkit
Hi aki,

I don't think it's sufficient to just have mysql-connector-java-5.1.6-
bin.jar in the Eclipse project class path.

In hosted mode you need to add it to the GWT dev shell launch script -
cp clause. In deployed (web) mode you need to add it to WEB-INF/lib.

regards
gregor

aki

unread,
Jul 7, 2008, 12:25:30 PM7/7/08
to Google Web Toolkit
Thanx. While waitng for post to become public, I menaged somehow and
fixed this problem.
I needed to add connector jar to lib folder. But lib folder should be
in folder where are shell and compile scripts. Actually, location of
lib folder isn't so important. Most important is that you need to add
path to connector in shell script. So, I edited shell script and added
this path and it started working :).

Thank you very much for trying to help :)

On Jul 7, 5:53 pm, gregor <greg.power...@googlemail.com> wrote:
> Hiaki,
>
> I don't think it's sufficient to just have mysql-connector-java-5.1.6-
> bin.jar in the Eclipse project class path.
>
> In hosted mode you need to add it to the GWT dev shell launch script -
> cp clause. In deployed (web) mode you need to add it to WEB-INF/lib.
>
> regards
> gregor
>
Reply all
Reply to author
Forward
0 new messages