struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Alexander (KADA 11)" <alexander.je...@csfs.com>
Subject RE: datasource classpath issue with MySQL driver
Date Tue, 02 Jul 2002 06:44:23 GMT
Hi,

at some time I had problems with MySQl-driver when I used the compressed
jar-file. Try to use the uncompressed jar-file.

hope this helps
Alexander

-----Original Message-----
From: matt_raible [mailto:matt_raible@yahoo.com]
Sent: Montag, 1. Juli 2002 06:08
To: struts-user@jakarta.apache.org
Subject: Re: datasource classpath issue with MySQL driver


You might want to try a newer version of the MySQL JDBC Driver.  I'm 
using 2.0.14 and it works fine in Tomcat.  Also, I register it with 
Tomcat via JNDI (server.xml) and then look it up in my classes.

HTH,

Matt

--- In struts@y..., Clay Graham <clayg@n...> wrote:
> Hello STRUTS Users,
> 
> I am asking a question because I am very suprised at an 
unexepected 
> behaviour and thought that someone may have a hint.
> 
> I have tomcat 404 ant struts 102 working and they have been 
tested, and I 
> am taking the next step by starting to connect to my MySql 
database, all 
> goodness.
> 
> So my first step was to add the datasource in my struts-config.xml 
as 
> follows:
> 
>     <data-sources>
>       <data-source>
>         <set-property property="autoCommit"
>                       value="false"/>
>         <set-property property="description"
>                       value="The Test Datasource"/>
>         <set-property property="driverClass"
>                       value="org.gjt.mm.mysql.Driver"/>
>         <set-property property="maxCount"
>                       value="4"/>
>         <set-property property="minCount"
>                       value="2"/>
>         <set-property property="password"
>                       value=""/>
>         <set-property property="url"
>                       value="jdbc:mysql://localhost/test"/>
>         <set-property property="user"
>                       value="root"/>
>       </data-source>
>     </data-sources>
> 
> the next step was to add the mm.mysql-2.0.6.1.jar to my project's 
> WEB-INF/lib directory, the standard approach....
> 
> [clay@meis test]$ jar -tvf test.war|grep mm.mysql
> 390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql-
2.0.6.1.jar
> 
> I am sure this JAR has the mysql driver in it:
> 
> [clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar 
|grep 
> Driver
>  15163 Sat Jun 16 09:20:28 PDT 2001 
> mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java
>   5443 Sat Jun 16 09:20:28 PDT 2001 
> mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class
> 
> so when I install the application using ant the following error 
occurs:
> 
> ----- Root Cause -----
> java.sql.SQLException: open: java.lang.ClassNotFoundException: 
> org.gjt.mm.mysql.Driver
> 
> I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it 
does not 
> find the driver. I am asking this question on this list because it 
happens 
> in struts-config.xml
> 
> any ideas & help is appreciated!
> 
> clay
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@j...>
> For additional commands, e-mail: <mailto:struts-user-help@j...>


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

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


Mime
View raw message