cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gapinski, Gary (GEL, MSX)" <Gary.Gapin...@lighting.ge.com>
Subject RE: C2.0: connection pool/ datasource problem
Date Tue, 16 Oct 2001 18:56:45 GMT
Do you have the Oracle JDBC driver class defined in the Cocoon
WEB-INF/web.xml file?

Mine has
    .
    .
    .
    <init-param>
      <param-name>load-class</param-name>
      <param-value>
        <!-- For IBM WebSphere: 
        com.ibm.servlet.classloader.Handler -->

        <!-- For Database Driver: -->
        oracle.jdbc.driver.OracleDriver

        <!-- For parent ComponentManager sample:
        org.apache.cocoon.samples.parentcm.Configurator
        -->
      </param-value>
    </init-param>
    .
    .
    .

and I have placed classes12.zip, *renamed to classes12.jar*, in the
CATALINA_HOME/common/lib directory.

You should also see success (or failure, in your case) indications wrt the
JDBC connections in the WEB-INF/logs/cocoon.log file.

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


Aloha folks,

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

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

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

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

Why wouldn't any connections be available?

I'm using:

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

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

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

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

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

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

any ideas??



  

-- 
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>

---------------------------------------------------------------------
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