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

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?


Reply via email to