cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grégory Roche <>
Subject Cocoon 2.2 and Mysql 5.0
Date Thu, 12 May 2011 14:21:20 GMT


after the mail, I'm trying to do a test with a database Mysql 5.0 and a block of Cocoon 2.2.
At this moment, it's a catastrophe, my browser return : 


"Hello This is my first Cocoon2 page filled with SQL data!  Failed to obtain connection from
datasource 'dbMySQL5'. Made 5 attempts with 5000ms interval" 

Mysql server is ok, and I have create my database with phpMyAdmin.

For my Cocoon, I have : 

-- in the file META-INF/cocoon/spring/datasource.xml : 

    <bean name="org.apache.avalon.excalibur.datasource.DataSourceComponent/dbMySQL5"
        <property name="wrappedBean">
            <bean class="org.springframework.jdbc.datasource.DriverManagerDataSource" >
              <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
              <property name="url" value="jdbc:mysql://188.165.XX.XX:3306/db?autoReconnect=true"/>

              <property name="username" value="XXX"/>
              <property name="password" value="XXX"/>

-- In my sitemap.xmap, I have my SQLTransformer and the pipeline for my sql-page.xml :

  <map:transformer logger="sitemap.transformer.sql"
      name="sql" src="org.apache.cocoon.transformation.SQLTransformer"/> 

    <map:match pattern="*">
        <map:generate src="xdocs/{1}.xml" />   
        <map:transform type="sql">
          <map:parameter name="use-connection" value="dbMySQL5" />
        <map:transform src="stylesheets/sql2html.xsl" />
        <map:transform type="servletLinkRewriter" />
        <map:serialize type="html" />

-- My file sql-page.xml is very simple, it contains just one request SQL :


    <para>This is my first Cocoon2 page filled with SQL data!</para>

    <sql:execute-query xmlns:sql="">
        select id, name, description from department

Have you an idea ? Thanks. 

Grégory Roche
fixe : +33 (0)
port : +33 (0)
View raw message