You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Le Ngoc Lam <le...@yahoo.com> on 2003/05/08 03:23:23 UTC

RE: ClassNotFoundException: org.gjt.mm.mysql.Driver

Shutdow Tomcat and copy JDBC driver for MySQL to
<CATALINA_HOME>/common/lib.

--- Josh Rayls <jr...@crunchtime.com> wrote:
> I believe you should have it under
> TOMCAT-DIR/webapps/MyWebApp/WEB-INF/lib.
> 
> -Josh
> 
> -----Original Message-----
> From: Siv Oma Rogdar [mailto:rogdar@idi.ntnu.no]
> Sent: Saturday, April 05, 2003 3:23 PM
> To: struts-user@jakarta.apache.org
> Subject: ClassNotFoundException:
> org.gjt.mm.mysql.Driver
> 
> 
> Hi,
> I'm trying out the Struts framework and trying to
> figure out how to connect
> to a database, but I can't get it to work...I get
> the exception:
> 
> javax.servlet.ServletException: Exception
> initializing application data
> source org.apache.struts.action.DATA_SOURCE
> 
> and root cause: java.sql.SQLException: open:
> java.lang.ClassNotFoundException:
> org.gjt.mm.mysql.Driver
> 
> when I try to connect to mysql in an Action class.
> I have defined the datasource in struts-config:
> 
> <data-source>
>    <set-property property ="driverClass"
>        value = "org.gjt.mm.mysql.Driver" />
>    <set-property property ="url"
>     value = "jdbc:mysql://localhost/MWCF" />
>   </data-source>
> 
> I have put the org.gjt.mm.mysql.Driver under both
> TOMCAT-DIR/common/lib and
> TOMCAT-DIR/webapps/MyWebApp/lib
> 
> Can anyone see what I'm doing wrong?
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org