Re: problem in getting Large Object from pooled PostgreSQL / Tomcat 6 - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: problem in getting Large Object from pooled PostgreSQL / Tomcat 6
Date
Msg-id 491f66a50812230358j784bde0ft72f34413e06c6cc4@mail.gmail.com
Whole thread Raw
In response to Re: problem in getting Large Object from pooled PostgreSQL / Tomcat 6  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-jdbc


On Tue, Dec 23, 2008 at 3:12 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
ahmettemiz88 wrote:
> I am trying to Retrieve image ( Large Object) from pooled PostgreSQL /
> tomcat 6:
>
> I am having some exceptions from following
>
> ds = (DataSource) ctx.lookup("java:comp/env/jdbc/bzk2");
> Connection conn = ds.getConnection();
> PGConnection pgCon = (PGConnection) ((DelegatingConnection)conn) //
> ****exception
> .getInnermostDelegate();
>
> lobj = ((org.postgresql.PGConnection)pgCon).getLargeObjectAPI();
>
[...]
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource
> $PoolGuardConnectionWrapper cannot be cast to
> org.apache.commons.dbcp.DelegatingConnection
>
>
> how can I solve the problem ?
You have to get the underlying connection from the pooled connection.

Dave

pgsql-jdbc by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: problem in getting Large Object from pooled PostgreSQL / Tomcat 6
Next
From: "ahmet temiz"
Date:
Subject: what to do to display largeobject (image)