cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: NEWBIE: Cannot connect to MySQL db
Date Tue, 07 Oct 2003 00:54:44 GMT
Joe Williams wrote:

> When using an XSP to connect to a MySQL database, I get an error, according
> to my WEB-INF/log/error.log:
> 
> "Could not get the datasource
> org.apache.avalon.excalibur.datasource.NoValidConnectionException No valid
> JdbcConnection class available at
> org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance
> (JdbcConnectionFactory.java:185)"
> 
> I am running Cocoon 2.0.4, Tomcat 4.1.18, and Apache 2 on Red Hat 8.0, 
> with MySQL 4.0

This can be caused by database permissions improperly set up (among 
other things).  Does the user have permission to connect from localhost? 
Can you connect from a straight jdbc test class?  I seem to remember 
having to specify 127.0.0.1 instead of localhost (or vice versa) in the 
past with MySQL.

Geoff

> I followed the directions at http://wiki.cocoondev.org/Wiki.jsp?page=MySQL,
> installing mysql-connector-java-3.0.8-stable-bin.jar in
> $COCOON_HOME/WEB-INF/lib and $TOMCAT_HOME/common/lib/ ... got the same error
> with the file in either place.
> 
> In $COCOON_HOME/WEB-INF/web.xml I added the line:
> 
> <!-- For MySQL Driver: -->
>         com.mysql.jdbc.Driver
> and also tried "org.gjt.mm.mysql.Driver" with the same effect.
> 
> In cocoon.xconf, I added:
> 
>   <jdbc name="DatabasePool">
>     <pool-controller min="5" max="10"/>
>     <dburl>jdbc:mysql://localhost:3306/DatabaseName</dburl>
>     <user>MyUsername</user>
>     <password>MyPassword</password>
>   </jdbc>
> 
> where "MyUsername" and "MyPassword" belong to a valid MySQL user with
> privileges for the database (and all databases, in fact).
> 
> Suggestions?
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message