Hi,
Your conf looks basically ok. The best way is to see what you get in mysql logs, if you are lucky it will maybe log a permission problem.

Restart mysql with log feature
mysqladmin shutdown -u root -p
mysqld_safe --log &
tail -f /var/lib/mysql/localhost.log

Phil

sergio del amo wrote:

Hi,
I am trying to query a mysql database from my cocoon installation. I am using Cocoon as a webapp of tomcat.
I made the next changes:

I added mysql Driver to web.xml:

  <init-param>
     <param-name>load-class</param-name>
     <param-value>
       <!-- For parent ComponentManager sample:
       org.apache.cocoon.samples.parentcm.Configurator -->
       <!-- For IBM WebSphere:
       com.ibm.servlet.classloader.Handler -->
           <!-- For Database Driver: -->
       <!--org.hsqldb.jdbcDriver-->

       <!-- Example for a MySQL database driver -->
       com.mysql.jdbc.Driver
       <!--org.gjt.mm.mysql.Driver-->
       </param-value>
   </init-param>


I added an entry to cocoon.xconf:

  <jdbc name="mmis2">
     <pool-controller max="10" min="5"/>
     <auto-commit>true</auto-commit>
     <dburl>jdbc:mysql://localhost/mmis2</dburl>
     <user>user</user>
     <password>user123</password>
   </jdbc>

and a match pipeline to sitemap.xmap:

 <map:match pattern="index.html">
    <map:generate src="style/queries/query.xml"/>
    <map:transform type="sql">
        <map:parameter name="use-connection" value="mmis2"/>
    </map:transform>
    <map:serialize type="xml"/>
 </map:match>

query.xml is:

   <?xml version="1.0"?>
   <results xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
       <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
           <sql:query>
             select * from collections
           </sql:query>
       </sql:execute-query>
   </results>

I copied the mysql connector (mysql-connector-java-3.0.16-ga-bin.jar) to cocoon/WEB-INF/lib

I thought everything was well configured but i get always:

"Failed to obtain connection. Made 5 attempts with 5000ms interval"

Any clue, why i am still getting this error?

thanks in advanced for your future feedback and merry christmas!!
sergio


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]