You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Terry Paddy <te...@yahoo.com> on 2001/10/09 05:07:01 UTC

[c2rc1a] Connection Pooling: No suitable driver

Hello All,

We were successfully using C2b1 with connection
pooling to a Postgresql database. We updated to c2rc1a
and now find when a new cocoon object is created a
connection pool cannot be created. (We are using
Tomcat 3.2.2) 

The following error is in cocoon.log

DEBUG   (2001-10-09) 15:50.03:655   [cocoon  ]
(Unknown-URI) Unknown-thread/AbstractPool:
org.apache.avalon.excalibur.datasource.JdbcConnection:
could not be instantiated.
java.sql.SQLException: No suitable driver
	at java.sql.SQLException.<init>(SQLException.java:66)
	at
java.sql.DriverManager.getConnection(DriverManager.java:543)
	at
java.sql.DriverManager.getConnection(DriverManager.java:183)
	at
org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(Unknown
Source)
	at
org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(Unknown
Source)
	at
org.apache.avalon.excalibur.pool.HardResourceLimitingPool.newPoolable(Unknown
Source)
	at
org.apache.avalon.excalibur.datasource.JdbcConnectionPool.newPoolable(Unknown
Source)
	at
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(Unknown
Source)
	at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(Unknown
Source)
	at
org.apache.avalon.excalibur.datasource.JdbcConnectionPool.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:498)

However if we connect to our database using just the
ESQL taglib and no connection pool, the data is
extracted correctly.

Our cocoon.xconf jdbc snipit is

  <datasources>
    <jdbc name="mydata">
      <pool-controller min="5" max="10"/>
      <auto-commit>true</auto-commit>
      <dburl>jdbc:postgresql//localhost/mysite</dburl>
      <user>anybody</user>
      <password>pass</password>
    </jdbc>
  </datasources>

we have also put the driver in the web.xml file as
documented

    <init-param>
      <param-name>load-class</param-name>
      <param-value>
        org.postgresql.Driver
      </param-value>
    </init-param>


Anybody else had this problem... or know where we
should look now (am believe me, we have been looking
:-) 

=====
_______________________________________
Terry Paddy - Christchurch, New Zealand

__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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


Re: [c2rc1a] Connection Pooling: No suitable driver

Posted by Berin Loritsch <bl...@apache.org>.
Henrik Hofmann wrote:
> 
> -----Original Message-----
> From: Adrian Geissel [mailto:ageissel@zenark.com]
> Sent: Dienstag, 9. Oktober 2001 09:33
> To: cocoon-users@xml.apache.org
> Subject: Re: [c2rc1a] Connection Pooling: No suitable driver
> 
> Hi,
> 
> I believe that you need a <drive/> tag in the <jdbc/> parameter set,
> something like:
> 
> To add jdbc drivers you need to insert something like this to the
> web.xml
> 
>     <init-param>
>           <param-name>load-class</param-name>
>           <param-value>
>             <!-- For Oracle Database: -->
>             oracle.jdbc.driver.OracleDriver
>           </param-value>
>         </init-param>

You can _either_ place the driver in the initial parameter "load-class",
_or_ place the driver in the <jdbc> markup (tag name "driver").  You won't
break anything, but it does add an extra burden.

> 
> Also you need to add the driver class files to a classpath visible to
> cocoon (e.g. web-inf/lib)
> 
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: [c2rc1a] Connection Pooling: No suitable driver

Posted by Henrik Hofmann <He...@creon-it.com>.

-----Original Message-----
From: Adrian Geissel [mailto:ageissel@zenark.com] 
Sent: Dienstag, 9. Oktober 2001 09:33
To: cocoon-users@xml.apache.org
Subject: Re: [c2rc1a] Connection Pooling: No suitable driver

Hi,

I believe that you need a <drive/> tag in the <jdbc/> parameter set,
something like:

To add jdbc drivers you need to insert something like this to the
web.xml

    <init-param>
	  <param-name>load-class</param-name>
	  <param-value>
	    <!-- For Oracle Database: -->
	    oracle.jdbc.driver.OracleDriver
	  </param-value>
	</init-param>

Also you need to add the driver class files to a classpath visible to
cocoon (e.g. web-inf/lib)


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


Re: [c2rc1a] Connection Pooling: No suitable driver

Posted by Adrian Geissel <ag...@zenark.com>.
Hi,

I believe that you need a <drive/> tag in the <jdbc/> parameter set,
something like:

>   <datasources>
>     <jdbc name="mydata">
>       <pool-controller min="5" max="10"/>

        <driver>org.postgresql.Driver</driver>

>       <auto-commit>true</auto-commit>
>       <dburl>jdbc:postgresql//localhost/mysite</dburl>
>       <user>anybody</user>
>       <password>pass</password>
>     </jdbc>
>   </datasources>
>

Hope this helps,
Adrian



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


*resolved-pls-ignore*Re: [c2rc1a] Connection Pooling: No suitable driver

Posted by Terry Paddy <bo...@paradise.net.nz>.
Apologies,
We have now resolved this. It was a typo in the jdbc URI which sneaked in 
during the move from C2b1 to C2rc1.
Terry Paddy

At 20:07 8/10/2001 -0700, you wrote:
>Hello All,
>
>We were successfully using C2b1 with connection
>pooling to a Postgresql database. We updated to c2rc1a
>and now find when a new cocoon object is created a
>connection pool cannot be created. (We are using
>Tomcat 3.2.2)
>
>The following error is in cocoon.log
>
>DEBUG   (2001-10-09) 15:50.03:655   [cocoon  ]
>(Unknown-URI) Unknown-thread/AbstractPool:
>org.apache.avalon.excalibur.datasource.JdbcConnection:
>could not be instantiated.
>java.sql.SQLException: No suitable driver
>         at java.sql.SQLException.<init>(SQLException.java:66)
>         at
>java.sql.DriverManager.getConnection(DriverManager.java:543)
>         at
>java.sql.DriverManager.getConnection(DriverManager.java:183)
>         at
>org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(Unknown
>Source)
>         at
>org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(Unknown
>Source)
>         at
>org.apache.avalon.excalibur.pool.HardResourceLimitingPool.newPoolable(Unknown
>Source)
>         at
>org.apache.avalon.excalibur.datasource.JdbcConnectionPool.newPoolable(Unknown
>Source)
>         at
>org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(Unknown
>Source)
>         at
>org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(Unknown
>Source)
>         at
>org.apache.avalon.excalibur.datasource.JdbcConnectionPool.run(Unknown
>Source)
>         at java.lang.Thread.run(Thread.java:498)
>
>However if we connect to our database using just the
>ESQL taglib and no connection pool, the data is
>extracted correctly.
>
>Our cocoon.xconf jdbc snipit is
>
>   <datasources>
>     <jdbc name="mydata">
>       <pool-controller min="5" max="10"/>
>       <auto-commit>true</auto-commit>
>       <dburl>jdbc:postgresql//localhost/mysite</dburl>
>       <user>anybody</user>
>       <password>pass</password>
>     </jdbc>
>   </datasources>
>
>we have also put the driver in the web.xml file as
>documented
>
>     <init-param>
>       <param-name>load-class</param-name>
>       <param-value>
>         org.postgresql.Driver
>       </param-value>
>     </init-param>
>
>
>Anybody else had this problem... or know where we
>should look now (am believe me, we have been looking
>:-)
>
>=====
>_______________________________________
>Terry Paddy - Christchurch, New Zealand
>
>__________________________________________________
>Do You Yahoo!?
>NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
>http://geocities.yahoo.com/ps/info1
>
>---------------------------------------------------------------------
>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: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>