cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Castagnaro <russ...@castagnaro.com>
Subject Re[2]: C2.0: connection pool/ datasource problem [interbase]
Date Fri, 19 Oct 2001 17:21:18 GMT
Hello Mark,

Mine did start working when I changed the classes12.zip file to
classes12.jar.  I guess the class loader only loads jars.

Have you confirmed the the url works and the Driver class is loaded?

Try an XSP page that loads the driver explicitly to confirm...

Friday, October 19, 2001, 6:41:16 AM, you wrote:

MSK> I'm having a similar problem with pooling setup for Interbase.  I've used
MSK> the Cocoon2 sample for ESQL to edit my page, sitemap, etc. but it still
MSK> won't work.

MSK> I've defined the datasource "cl" (that's C and L -- not C and ONE) and in
MSK> cocoon.xconf as:
MSK>   <datasources>
MSK>     <jdbc name="cl">
MSK>       <pool-controller min="5" max="10"/>

MSK> <dburl>jdbc:interbase://localhost/d:/www/interbase/data/dev01.gdb</dburl>
MSK>       <user>user</user>
MSK>       <password>pass</password>
MSK>     </jdbc>
MSK>   </datasources>

MSK> and left the "default" cocoon2 datasource of "personnel" (so the C2 samples
MSK> still work):
MSK>   <datasources>
MSK>     <jdbc name="personnel">
MSK>       <pool-controller min="5" max="10"/>
MSK>       <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
MSK>       <user>sa</user>
MSK>       <password></password>
MSK>     </jdbc>
MSK>   </datasources>

MSK> In my XSP page I have:
MSK> <?xml version="1.0" encoding="ISO-8859-1"?>
MSK> <xsp:page
MSK>     language="java"
MSK>     xmlns:xsp="http://apache.org/xsp"
MSK>     xmlns:esql="http://apache.org/cocoon/SQL/v2"
>>
MSK>     <page>
MSK>         <pagetitle>Employees Working Report</pagetitle>
MSK>     <esql:connection>
MSK>         <esql:pool>cl</esql:pool>
MSK>         <esql:execute-query>
MSK>             <esql:query>select * from employee</esql:query>
MSK>             <esql:results>
MSK>                 <esql:row-results>
MSK>                     <employee>
MSK>                         <lastname><esql:get-string
column="last_name"/>></lastname>
MSK>                         <firstname><esql:get-string
MSK> column="first_name"/></firstname>
MSK>                         <empid><esql:get-string
MSK> column="employee_id"/></empid>
MSK>                         <esql:no-results>
MSK>                             <user>No one is working</user>
MSK>                         </esql:no-results>
MSK>                     </employee>
MSK>                 </esql:row-results>
MSK>             </esql:results>
MSK>       </esql:execute-query>
MSK>     </esql:connection>
MSK>     </page>
MSK> </xsp:page>

MSK> I am getting this error in my cocoon.log file when my XSP page tries to use
MSK> the pool:
MSK> ExcaliburComponentSelector: datasources: ComponentSelector could not find
MSK> the component for hint: cl
MSK> working4_xsp: Could not get the datasource
MSK> org.apache.avalon.framework.component.ComponentException: datasources:
MSK> ComponentSelector could not find the component for hint: cl

MSK> If I change the XSP page to use these lines in place of the "esql:pool"
MSK> lines, it works:
MSK>         <esql:driver>interbase.interclient.Driver</esql:driver>

MSK> <esql:dburl>jdbc:interbase://localhost/d:/www/interbase/data/dev01.gdb</esql
:dburl>>
MSK>         <esql:username>user</esql:username>
MSK>         <esql:password>pass</esql:password>

MSK> Russell, did you get yours to work?

MSK> Thanks!
MSK> Mark

MSK> -----Original Message-----
MSK> From: Russell Castagnaro [mailto:russell@castagnaro.com]
MSK> Sent: Tuesday, October 16, 2001 12:21 PM
MSK> To: cocoon-users@xml.apache.org
MSK> Subject: C2.0: connection pool/ datasource problem


MSK> Aloha folks,

MSK> I'm having a strange problem with C2 for All db connections

MSK> I've tried using mysql and oracle and they both have the same
MSK> problem..

MSK> I'm preloading the driver classes and I've tested my db connections.
MSK> The error I get when using the esql taglib is:

MSK> org.apache.cocoon.ProcessingException: Exception in
MSK> ServerPagesGenerator.generate():
MSK> java.lang.RuntimeException: Could not get the datasource
MSK> java.sql.SQLException:
MSK> There are no connections in the pool, check your settings.
MSK> at
MSK> org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
MSK> tor.java:187)
MSK> at
MSK> org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
MSK> entPipeline.java:214)
MSK> at
MSK> org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
MSK> treamPipeline.java:364)
MSK> at
MSK> org.apache.cocoon.www.sitemap_xmap.wildcardMatchN40043E(sitemap_xmap.java:57
MSK> 40)
MSK> at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2593)
MSK> at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2205)
MSK> at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)

MSK> Why wouldn't any connections be available?

MSK> I'm using:

MSK>   <datasources>
MSK>     <jdbc name="fun">
MSK>       <pool-controller min="5" max="10" oradb="true"/>
MSK>       <dburl>jdbc:oracle:thin:@localhost:1521:ORCL</dburl>
MSK>       <user>scott</user>
MSK>       <password>tiger</password>
MSK>     </jdbc>

MSK>     and
MSK> <?xml version="1.0" encoding="ISO-8859-1"?>

MSK> <xsp:page
MSK>           language="java"
MSK>           xmlns:xsp="http://apache.org/xsp"
MSK>           xmlns:esql="http://apache.org/cocoon/SQL/v2"
>>

MSK>   <page>
MSK>    <title>A Database Driven XSP Page</title>
MSK>    <content>

MSK>    <esql:connection>
MSK>      <esql:pool>fun</esql:pool>
MSK>      <esql:execute-query>
MSK>        <esql:query>Select * from EMP</esql:query>
MSK>        <esql:results>
MSK>          <esql:row-results>
MSK>            <para><esql:get-string column="ename"/></para>
MSK>            <esql:get-columns/>
MSK>          </esql:row-results>
MSK>        </esql:results>
MSK>      </esql:execute-query>
MSK>    </esql:connection>

MSK>    </content>
MSK>   </page>
MSK> </xsp:page>
MSK> </xsp:page>

MSK> any ideas??





MSK> --
MSK> Best regards,
MSK>  Russell                          mailto:russell@castagnaro.com


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

MSK> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
MSK> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


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

MSK> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
MSK> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>



-- 
Best regards,
 Russell                            mailto:russell@castagnaro.com


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message