cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto" <rma...@montefiore.ch>
Subject MySQL Database connection
Date Sun, 14 Nov 2004 15:13:23 GMT
Hiya all,
I got a problem connection with my MySQL database. I guess I did the right stuff, I mean in
the web.xml file I added this:

    <init-param>
      <param-name>load-class</param-name>
      <param-value>
        <!-- For MySQL on localhost -->
        org.gjt.mm.mysql.Driver

        <!-- For JDBC-ODBC Bridge: -->
        sun.jdbc.odbc.JdbcOdbcDriver
      </param-value>
    </init-param>

then in the cocoon.xconf I added this

    <jdbc logger="core.datasources.mysql_pool" name="mysql_pool">
      <pool-controller min="5" max="10">
      <dburl>jdbc:mysql:://<dblocation>/<databaseName></dburl>
      <user>roberto</user>
      <password/>
    </jdbc>

If I let the things like that the log file tell me:
ERROR   (2004-11-14) 15:54.31:820   [sitemap.transformer.sql] (/montefiore/hellococoon) PoolThread-3/SQLTransformer.Query:
Could not use connection: mysql_pool org.apache.avalon.framework.service.ServiceException:
datasources: ComponentSelector could not find the component for hint [mysql_pool] (key [mysql_pool])
(Key='org.apache.avalon.excalibur.datasource.DataSourceComponentSelector/mysql_pool')

Seems he can't find the component & maybe it got right (sure it got...), so what I did
is try to change the name like that:

    <jdbclogger="core.datasources.personnel" name="personnel">
      <pool-controller min="5" max="10">
      <dburl>jdbc:mysql:://<dblocation>/<databaseName></dburl>
      <user>roberto</user>
      <password/>
    </jdbc>

personnel is the standard name of the Cocoon database (jdbc:hsqldb:hsql://localhost:9002)
I guess.. infact the log error file in this case tell me that he can't find the table that
Im looking for, of course the connection is with another database that dosnt' have my table...

So my question is, where I can define a logger & a name for the mysql database & how
I can set it properly?

Thanx in advance for any suggestion.
Ciao
Roberto



Mime
View raw message