Daniel,
Apparently a lot of people have been having trouble getting mySQL+C2 to work
with the 1.4 JDK. I'd try 1.3 and see if that helps any. HTH.
-Zack
On 5/4/02 4:00 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> 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?
>
>
> Thanks,
> Daniel
>
>
> Some more details:
>
> WEB-INF/logs/sitemap.log contains:
> ------------------------------------
> DEBUG (2002-05-01) 21:21.01:120
> [sitemap.transformer.sql](/cocoon/xxx/1.html)
> Thread-15/SQLTransformer: SQLTransformer executing query nr 0
> DEBUG (2002-05-01) 21:21.01:124
> [sitemap.transformer.sql](/cocoon/xxx/1.html)
> Thread-15/SQLTransformer$Query: EXECUTING
> SELECT * FROM PERSONEN WHERE ID = 1
> DEBUG (2002-05-01) 21:21.01:147
> [sitemap.transformer.sql](/cocoon/xxx/1.html)
> 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
> [core.datasources.stammbaum-mysql](/cocoon/xxx/1.html)
> Thread-15/LogKitLogger: Could not return Connection
> org.apache.avalon.excalibur.datasource.NoValidConnectionException: No
> valid Jdbc Connection class available
> at
> org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInsta
> nce(JdbcConnectionFactory.java:183)
> at
> org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(Res
> ourceLimitingPool.java:491)
> [...]
>
> 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:pipeline>
> <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:transform>
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
>
> Excerpt from WEB-INF/cocoon.xconf
> -----------------------------------
> <jdbc logger="core.datasources.xxx-mysql" name="xxx-mysql">
> <dburl>jdbc:mysql://localhost/xxx</dburl>
> <user>daniel</user>
> <password/>
> </jdbc>
>
> 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
> ------------------------------
> <init-param>
> <param-name>load-class</param-name>
> <param-value>
> [...snip ...]
> <!-- MySQL JDBC driver -->
> org.gjt.mm.mysql.Driver
> </param-value>
> </init-param>
>
> 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. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>