ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Marshall" <ch...@campsbayterrace.com>
Subject Re: Deploying gwt + iBatis + MySql via Tomcat
Date Fri, 25 Jul 2008 07:13:18 GMT
Hi Richard,
Thanks for the rapid response.

The MySql driver is in the tomcat/lib directory which I think is
correct for Tomcat 6, and it works fine without the jndi pooling. The
dbcp jars are bundled in tomcat-dbcp.jar in Tomcat 6, but I have also
tested with the individual jars without success.
I have tried modifying the Resource tag as you suggest, also without success.

The puzzling thing is that it all works (well) without jndi so the
dbms and jdbc side is OK. However it would be preferable to access the
dbms resource via jndi if possible.
I have read and reread the Apache documents including a specific MySql howto at
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
and am running out of ideas!!

Regards Chris

On 25/07/2008, Richard Yee <ryee@cruzio.com> wrote:
> Chris,
> I think you are missing the factory attribute in your Resource tag in your
> context.xml
>
>        <Resource name="jdbc/MyDb"
>
> factory"org.apache.commons.dbcp.BasicDataSourceFactory"
>                auth="Container"
>                type="javax.sql.DataSource"
>                maxActive="100" maxIdle="30" maxWait="10000"
>                username="xx" password="yy"
>                driverClassName="com.mysql.jdbc.Driver"
>
> url="jdbc:mysql://localhost:3306/MyDb?autoReconnect=true"/>
>
> Do you have your mysql-connector and dbcp jar files in your tomcat's
> common/lib directory?
>
> -Richard
>

Mime
View raw message