Apache Server configuration support - Cocoon MySQL

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > December 2005 > Cocoon MySQL





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cocoon MySQL
Josef Alexander Hahn

2005-12-23, 5:59 pm

Hi.

I hope you can help me with a cocoon problem. I use Cocoon 2.1.6 on a Tomcat
5.0.27-r6. My Sitemap does the following (truncated to the interesting
parts):

,----[ sitemap.xmap ]
| <?xml version="1.0" encoding="UTF-8"?>
| <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
| <map:components>
|
| <map:generators default="file">
| <map:generator label="content" logger="sitemap.generator.file"
| name="file" pool-grow="4" pool-max="32" pool-min="8"
| src="org.apache.cocoon.generation.FileGenerator"/>
| </map:generators>
|
| <map:transformers default="xslt">
| <map:transformer logger="sitemap.transformer.xslt" name="xslt"
| pool-grow="2" pool-max="32" pool-min="8"
| src="org.apache.cocoon.transformation.TraxTransformer">
| <use-request-parameters>false</use-request-parameters>
| <use-session-parameters>false</use-session-parameters>
| <use-cookie-parameters>false</use-cookie-parameters>
| <xslt-processor-role>xalan</xslt-processor-role>
| <check-includes>true</check-includes>
| </map:transformer>
| <map:transformer name="sql"
| src="org.apache.cocoon.transformation.SQLTransformer"/>
| </map:transformers>
|
| [...]
|
| <map:pipelines>
| <map:component-configurations>
| <global-variables>
| <!--+
| | Define global parameters here:
| | <skin>my_skin</skin>
| | ...
| | You can access them by {global:*name*}, e.g. {global:skin}.
| | These values are inherited into sub-sitemaps and can
| | be extended there.
| +-->
| </global-variables>
| </map:component-configurations>
|
| <map:pipeline>
|
| <map:match pattern="">
| <map:generate src="zitate.xml"/>
| <map:transform type="sql">
| <map:parameter name="use-connection" value="kampfsau"/>
| <map:parameter name="show-nr-of-rows" value="true"/>
| <map:parameter name="clob-encoding" value="UTF-8"/>
| </map:transform>
| <map:transform src="welcome.xslt">
| <map:parameter name="contextPath" value="{request:contextPath}"/>
| </map:transform>
| <map:serialize type="xhtml"/>
| </map:match>
|
| </map:pipeline>
| </map:pipelines>
|
| </map:sitemap>
`----

Cocoon shall read the zitate.xml...

,----[ zitate.xml ]
| <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0">
| <sql:query name="department">
| select zitat,autor from zitate where id=400
| </sql:query>
| </sql:execute-query>
`----

.... and then it shall execute the SQL queries. Right? But nothing happens.
Cocoon should find the mysql JDBC Driver and the connection "kampfsau" is
configured at the right place. But, when i make a request, it hangs. The
browser shows nothing. I think there are problems while establishing the
connection. Sometimes, the logs show something like

"WARN (2005-12-24) 00:08.05:526 [core.manager] (/cocoon/kampfsau/)
http-8080-Processor25/ResourceLimitingJdbcDataSource: Could not return
Connection
java.sql.SQLException: Unable to load class for logger
'com.mysql.jdbc.log.Log4JLogger'"

Is that relevant for my problem? How can i find out where the problem is?
How can i set up cocoon for better debug informations in general? what
should be installed to establish a mysql-connection via the sqltransformer?
why can i test these components to find the erreneous part? and, do you
know a good url for cocoon beginners? it should be an up to date and simple
practical introduction, not the so technical documentation.


thanks a lot

Josef Hahn

--
Josef Hahn|Mehl: mail@josef-hahn.de|Jabber: project_coleslaw@amessage.de

When one burns one's bridges, what a very nice fire it makes.
-- Dylan Thomas

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com