cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wehr <>
Subject ClassCastException for Postgres datasource in Generator
Date Mon, 15 Dec 2003 06:58:12 GMT
I posted this to cocoon user list but did not get a helpful answer, so I 
try again here. Sorry for double posting:

In one of our Generators we want to use Postgres as Datasource. In
web.xml we added the postgres driver this way:


In cocoon.xconf we added the parameters for the connection:
     <jdbc name="vrgis">
       <pool-controller max="10" min="5"/>

In our Generator we implemented the Interface Composable with this method:

public void compose(ComponentManager manager) throws ComponentException {
ComponentSelector selector = (ComponentSelector)
this.datasource = (DataSourceComponent)"vrgis");

Wenn we try to use the datasource in the generate-method we get a

Connection conn =  datasource.getConnection();

The exception occurs when we try to cast the Connection. When we build
the connection ourself everything is working fine:

String url = "jdbc:postgresql://";
Connection conn = DriverManager.getConnection(url, dbuser, dbpass);

In both ways the System.outs give:

Do you have any hints, whats happening here? We are using Cocoon 2.1.3
on Suse Linux 8.1. We tested several postgres-driver version, but that
didn't help out here.


View raw message