Hi

My problem with cocoon is that i cannot get a pooled connection.
(tomcat 4.1.2-le, jdk1.4.0, cocoon 2.0.2)

Instead i get the followind error message:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get
the datasource
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid
JdbcConnection class available

I can see in the mysql log that cocoon creates the connection. But it does
no querys. each time i access the dbauthaction it does a new connect, a
"SHOW VARIABLES" query and a QUIT.

web.xml: (the mm mysql driver lib is in ...webapproot/WEB-INF/lib)
    <init-param>
      <param-name>load-class</param-name>
      <param-value>org.gjt.mm.mysql.Driver</param-value>
    </init-param>


cocoon.xconf:
        <jdbc name="test">
            <pool-controller min="2" max="10"/>
            <dburl>jdbc:mysql://localhost:3306/test</dburl>
            <user>test</user>
            <password/>
        </jdbc>

sitemap:
...
        <map:actions>
           <map:action name="dbAuth"
src="org.apache.cocoon.acting.DatabaseAuthenticatorAction"/>

...

            <map:match pattern="login">
              <map:act type="dbAuth">
                  <map:parameter name="descriptor"
value="context://pubs/tms/xml/descriptors/auth.xml"/>
                  <map:generate type="serverpages" src="xsp/index.xsp"/>
                  <map:transform src="xsl/index.xsl"/>
                  <map:serialize/>
            </map:act>
                <map:read src="html/login.html" mime-type="text/html"/>
            </map:match>
....


auth.xml:
<root>
         <connection>test</connection>
         <table name="users">
                 <select dbcol="user"           to-session="u_user"
type="string"   request-param="user"/>
                 <select dbcol="pass"           to-session="u_pass"
type="string"   request-param="pass"/>
         </table>
 </root>


i´va no clue whats wrong because all except database related things wirk
(even the formvalaction is working).

greetings
mike



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to