Hi,

have you tried to connect with a mysql client from you local machine
to the mysql server?

It seems to me a connection related problem.

Cheers,

Jeroen

2011/5/12 Grégory Roche <webmas...@polymorphisme.org>:
>  Hi,
>
> 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 :
>
> http://locahost:8888/test/sql-page
>
> "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"
>
> class="org.apache.cocoon.databases.bridge.spring.avalon.SpringToAvalonDataSourceWrapper">
>         <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"/>
>             </bean>
>         </property>
>     </bean>
>
> -- 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>
>         <map:transform src="stylesheets/sql2html.xsl" />
>         <map:transform type="servletLinkRewriter" />
>         <map:serialize type="html" />
>       </map:match>
>
> -- My file sql-page.xml is very simple, it contains just one request SQL :
>
> <page>
>   <title>Hello</title>
>
>   <content>
>     <para>This is my first Cocoon2 page filled with SQL data!</para>
>
>     <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
>       <sql:query>
>         select id, name, description from department
>       </sql:query>
>     </sql:execute-query>
>   </content>
> </page>
>
> Have you an idea ? Thanks.
>
> Grégory Roche
>
> www.polymorphisme.com
> webmas...@polymorphisme.org
> fixe : +33 (0)5.24.07.64.02
> port : +33 (0)6.89.54.14.84

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to