cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Can't connect to MySQL with Cocoon 2
Date Sat, 04 May 2002 21:00:34 GMT
Hello all,

I have a problem connecting to a MySQL database with Cocoon. When I
try to access a page that goes through the SQLTransformer, the browser
doesn't deliver any result. There's no error message, the browser just
sits there and waits for data. The Coccon core.log file contains an
error message "No valid Jdbc Connection class available". (More
details follow below.)

I've checked Google, the mailing list archive, and the FAQs, but
didn't find anything that seemed to help. I'm surely missing
something; aynone out there can help me?


Some more details:

 WEB-INF/logs/sitemap.log contains:
DEBUG   (2002-05-01) 21:21.01:120
Thread-15/SQLTransformer: SQLTransformer executing query nr 0
DEBUG   (2002-05-01) 21:21.01:124
Thread-15/SQLTransformer$Query: EXECUTING
DEBUG   (2002-05-01) 21:21.01:147
Thread-15/SQLTransformer$Query: SQLTransformer$Query: could no
t acquire a Connection -- waiting 5000 ms to try again.

The last message gets repeated over and over again. The query looks
OK, but apparently something goes wrong, and Cocoon just tries again.
That doesn't really make sense to me, since what ever is going wrong,
will be just as wrong 5s later. Anyway... so something is wrong with
the SQL connection. But what?

 WEB-INF/logs/core.log contains:
WARN    (2002-05-01) 21:55.23:219
Thread-15/LogKitLogger: Could not return Connection
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No
valid Jdbc Connection class available

The stack trace is much longer; I'm happy to send more if anyone can
use this. Cocoon can't get Jdbc Connection class. What does that mean?

 Excerpt from sitemap.xmap
The relevant pipeline definition looks like:
(If you're wondering why I use an XML serializer on an *.html ending:
That's just for debugging; shouldn't have anything to do with the
problem, right?)

  <map:match pattern="xxx/*.html">
   <map:generate src="xxx/person.xml"/>
   <map:transform type="sql">
    <map:parameter name="use-connection" value="xxx-mysql"/>
    <map:parameter name="id" value="{1}"/>
   <map:serialize type="xml"/>

 Excerpt from WEB-INF/cocoon.xconf
    <jdbc logger="" name="xxx-mysql">

I can connect fine to the database using ODBC from Windows, and that
parameter set. So I don't suspect anything wrong here.

 Excerpt from WEB-INF/web.xml
[...snip ...]
      <!-- MySQL JDBC driver -->

This loads the JDBC driver, right?

 System and Software versions
- Coccon 2.0.2
- Tomcat 3.3.1
- Sun Java JSDK 1.4, Linux
- RedHat Linux 7.2
- mm.mysql JDBC driver 2.0.13
  (copied into WEB-INF/libs)
- MySQL 3.23.41 
  (running on same host)

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message