Re: What do people use for connection pooling with PostgreSQL JDBC

Lists: pgsql-jdbc
From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-03-05 08:31:40
Message-ID: 1236241901.12460.6.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

The specific solution should work well with

- hibernate
- pure JDBC with postgresql specific types and arrays

Do you use something inside java or do you just use stuff like pgpool or
pgbouncer ?

--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-03-05 13:13:58
Message-ID: 491f66a50903050513r46ab0531h4892e973dec51f18@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

dbcp, or c3po, however pgbouncer has it's merits too if you have a large
number of app servers hitting the same db server.

Dave

On Thu, Mar 5, 2009 at 3:31 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:

> The specific solution should work well with
>
> - hibernate
> - pure JDBC with postgresql specific types and arrays
>
> Do you use something inside java or do you just use stuff like pgpool or
> pgbouncer ?
>
>
> --
> Hannu Krosing http://www.2ndQuadrant.com
> PostgreSQL Scalability and Availability
> Services, Consulting and Training
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>


From: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Hannu Krosing <hannu(at)2ndquadrant(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-03-05 20:56:29
Message-ID: 1d4e0c10903051256j7750bde3t92161d0497cf04a2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Thu, Mar 5, 2009 at 2:13 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> dbcp, or c3po, however pgbouncer has it's merits too if you have a large
> number of app servers hitting the same db server.

Same here, c3p0 more often than dbcp.

We use pgbouncer only for the big PHP platforms.

--
Guillaume


From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-06 11:13:18
Message-ID: 1239016398.8411.2.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Thu, 2009-03-05 at 08:13 -0500, Dave Cramer wrote:
> dbcp, or c3po, however pgbouncer has it's merits too if you have a
> large number of app servers hitting the same db server.

It seems that neither dbcp not c3po does not support Arrays ?

How have you dealt with that ?

> Dave
>
> On Thu, Mar 5, 2009 at 3:31 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com>
> wrote:
> The specific solution should work well with
>
> - hibernate
> - pure JDBC with postgresql specific types and arrays
>
> Do you use something inside java or do you just use stuff like
> pgpool or
> pgbouncer ?
>
>
> --
> Hannu Krosing http://www.2ndQuadrant.com
> PostgreSQL Scalability and Availability
> Services, Consulting and Training
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-06 11:43:53
Message-ID: 491f66a50904060443o7e80fae8mfb6f403fb9a53467@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

huh ? What makes you think it doesn't deal with arrays ?

Dave

On Mon, Apr 6, 2009 at 7:13 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:

> On Thu, 2009-03-05 at 08:13 -0500, Dave Cramer wrote:
> > dbcp, or c3po, however pgbouncer has it's merits too if you have a
> > large number of app servers hitting the same db server.
>
> It seems that neither dbcp not c3po does not support Arrays ?
>
> How have you dealt with that ?
>
> > Dave
> >
> > On Thu, Mar 5, 2009 at 3:31 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com>
> > wrote:
> > The specific solution should work well with
> >
> > - hibernate
> > - pure JDBC with postgresql specific types and arrays
> >
> > Do you use something inside java or do you just use stuff like
> > pgpool or
> > pgbouncer ?
> >
> >
> > --
> > Hannu Krosing http://www.2ndQuadrant.com
> > PostgreSQL Scalability and Availability
> > Services, Consulting and Training
> >
> >
> > --
> > Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-jdbc
> >
> --
> Hannu Krosing http://www.2ndQuadrant.com
> PostgreSQL Scalability and Availability
> Services, Consulting and Training
>
>


From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 08:35:22
Message-ID: 1239093322.7647.9.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer wrote:
> huh ? What makes you think it doesn't deal with arrays ?

I have a sample function, whit takes an array argument

CREATE OR REPLACE FUNCTION arraySum(
multiplier bigint,
valuelist bigint[],
OUT result int
) AS
$$
BEGIN
result = 0;
FOR idx IN array_lower(valuelist, 1)..array_upper(valuelist, 1) LOOP
result = result + multiplier * valuelist[idx];
END LOOP;
RETURN;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;

When I call this function directly via JDBC or using proxool I get a
result, when doing it via c3p0 or dbcp I get an exception -

Long[] array = { 1L, 2L };
PreparedStatement ps = conn.prepareStatement(
"SELECT * FROM arraySum(?, ?)");
ps.setLong(1, 3L);
ps.setArray(2, conn.createArrayOf("bigint", array));
ps.execute();

--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 10:24:23
Message-ID: 491f66a50904070324g19aee516vb5b1922b23450a27@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Tue, Apr 7, 2009 at 4:35 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:

> On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer wrote:
> > huh ? What makes you think it doesn't deal with arrays ?
>
> I have a sample function, whit takes an array argument
>
> CREATE OR REPLACE FUNCTION arraySum(
> multiplier bigint,
> valuelist bigint[],
> OUT result int
> ) AS
> $$
> BEGIN
> result = 0;
> FOR idx IN array_lower(valuelist, 1)..array_upper(valuelist, 1) LOOP
> result = result + multiplier * valuelist[idx];
> END LOOP;
> RETURN;
> END;
> $$ LANGUAGE plpgsql SECURITY DEFINER;
>
>
> When I call this function directly via JDBC or using proxool I get a
> result, when doing it via c3p0 or dbcp I get an exception -
>
> Long[] array = { 1L, 2L };
> PreparedStatement ps = conn.prepareStatement(
> "SELECT * FROM arraySum(?, ?)");
> ps.setLong(1, 3L);
> ps.setArray(2, conn.createArrayOf("bigint", array));
> ps.execute();
>

OK, createArrayOf is a relatively new method. So .... you have a few ways
around this.

1) don't use it, create your own arrays.
2) fix the dbcp code
3) complain to dbcp people

>
>
> --
> Hannu Krosing http://www.2ndQuadrant.com
> PostgreSQL Scalability and Availability
> Services, Consulting and Training
>
>


From: "Peter" <peter(at)greatnowhere(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 11:12:16
Message-ID: 00ac01c9b771$b627f830$2277e890$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

I think you can extract the underlying PGConnection object by calling conn.getInnerMostDelegate() (sp?) method and then do your array stuff. Your dbcp datasource has to allow access to underlying JDBC objects however (there was a property to allow this).

From: pgsql-jdbc-owner(at)postgresql(dot)org [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Dave Cramer
Sent: Tuesday, April 07, 2009 1:24 PM
To: Hannu Krosing
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] What do people use for connection pooling with PostgreSQL JDBC

On Tue, Apr 7, 2009 at 4:35 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:

On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer wrote:
> huh ? What makes you think it doesn't deal with arrays ?

I have a sample function, whit takes an array argument

CREATE OR REPLACE FUNCTION arraySum(
multiplier bigint,
valuelist bigint[],
OUT result int
) AS
$$
BEGIN
result = 0;
FOR idx IN array_lower(valuelist, 1)..array_upper(valuelist, 1) LOOP
result = result + multiplier * valuelist[idx];
END LOOP;
RETURN;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;

When I call this function directly via JDBC or using proxool I get a
result, when doing it via c3p0 or dbcp I get an exception -

Long[] array = { 1L, 2L };
PreparedStatement ps = conn.prepareStatement(
"SELECT * FROM arraySum(?, ?)");
ps.setLong(1, 3L);
ps.setArray(2, conn.createArrayOf("bigint", array));
ps.execute();

OK, createArrayOf is a relatively new method. So .... you have a few ways around this.

1) don't use it, create your own arrays.
2) fix the dbcp code
3) complain to dbcp people

--

Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training


From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 13:23:32
Message-ID: 1239110612.7647.15.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Tue, 2009-04-07 at 06:24 -0400, Dave Cramer wrote:
>
>
> On Tue, Apr 7, 2009 at 4:35 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com>
> wrote:
> On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer wrote:
> > huh ? What makes you think it doesn't deal with arrays ?
>
>
> I have a sample function, whit takes an array argument
>
> CREATE OR REPLACE FUNCTION arraySum(
> multiplier bigint,
> valuelist bigint[],
> OUT result int
> ) AS
> $$
> BEGIN
> result = 0;
> FOR idx IN array_lower(valuelist,
> 1)..array_upper(valuelist, 1) LOOP
> result = result + multiplier * valuelist[idx];
> END LOOP;
> RETURN;
> END;
> $$ LANGUAGE plpgsql SECURITY DEFINER;
>
>
> When I call this function directly via JDBC or using proxool I
> get a
> result, when doing it via c3p0 or dbcp I get an exception -
>
> Long[] array = { 1L, 2L };
> PreparedStatement ps = conn.prepareStatement(
> "SELECT * FROM arraySum(?, ?)");
> ps.setLong(1, 3L);
> ps.setArray(2, conn.createArrayOf("bigint", array));
> ps.execute();
>
> OK, createArrayOf is a relatively new method. So .... you have a few
> ways around this.
>
> 1) don't use it, create your own arrays.
> 2) fix the dbcp code
> 3) complain to dbcp people

It's both dbcp and c3po.

I understand that dbcp and c3po work on some other databases jdbc
drivers, so maybe I could also do

4) fix jdbc code to provide required createArrayOf support

no ?

>
--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training


From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 13:25:28
Message-ID: 49DB5448.3050204@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hannu Krosing wrote:

> I understand that dbcp and c3po work on some other databases jdbc
> drivers, so maybe I could also do
>
> 4) fix jdbc code to provide required createArrayOf support
>
> no ?

You could start by showing us the actual exception that you get?

-O


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 13:39:07
Message-ID: 491f66a50904070639g6fe91d6dxa0f856e42e5cccce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Tue, Apr 7, 2009 at 9:23 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:

> On Tue, 2009-04-07 at 06:24 -0400, Dave Cramer wrote:
> >
> >
> > On Tue, Apr 7, 2009 at 4:35 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com>
> > wrote:
> > On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer wrote:
> > > huh ? What makes you think it doesn't deal with arrays ?
> >
> >
> > I have a sample function, whit takes an array argument
> >
> > CREATE OR REPLACE FUNCTION arraySum(
> > multiplier bigint,
> > valuelist bigint[],
> > OUT result int
> > ) AS
> > $$
> > BEGIN
> > result = 0;
> > FOR idx IN array_lower(valuelist,
> > 1)..array_upper(valuelist, 1) LOOP
> > result = result + multiplier * valuelist[idx];
> > END LOOP;
> > RETURN;
> > END;
> > $$ LANGUAGE plpgsql SECURITY DEFINER;
> >
> >
> > When I call this function directly via JDBC or using proxool I
> > get a
> > result, when doing it via c3p0 or dbcp I get an exception -
> >
> > Long[] array = { 1L, 2L };
> > PreparedStatement ps = conn.prepareStatement(
> > "SELECT * FROM arraySum(?, ?)");
> > ps.setLong(1, 3L);
> > ps.setArray(2, conn.createArrayOf("bigint", array));
> > ps.execute();
> >
> > OK, createArrayOf is a relatively new method. So .... you have a few
> > ways around this.
> >
> > 1) don't use it, create your own arrays.
> > 2) fix the dbcp code
> > 3) complain to dbcp people
>
> It's both dbcp and c3po.
>
> I understand that dbcp and c3po work on some other databases jdbc
> drivers, so maybe I could also do
>
> 4) fix jdbc code to provide required createArrayOf support
>
> no ?
>

Well, the newer drivers support createArray, so perhaps you need a newer
driver ?

As well as showing us the exception.

>
> >
> --
> Hannu Krosing http://www.2ndQuadrant.com
> PostgreSQL Scalability and Availability
> Services, Consulting and Training
>
>


From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 13:40:55
Message-ID: 1239111655.7647.17.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Wed, 2009-04-08 at 01:25 +1200, Oliver Jowett wrote:
> Hannu Krosing wrote:
>
> > I understand that dbcp and c3po work on some other databases jdbc
> > drivers, so maybe I could also do
> >
> > 4) fix jdbc code to provide required createArrayOf support
> >
> > no ?
>
> You could start by showing us the actual exception that you get?

for dbcp -

java.lang.AbstractMethodError:
org.apache.tomcat.dbcp.dbcp.PoolingDataSource
$PoolGuardConnectionWrapper.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;

for c3p0 -

java.lang.AbstractMethodError:
com.mchange.v2.c3p0.impl.NewProxyConnection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;

> -O
>
--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training


From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 14:02:53
Message-ID: 1239112973.7647.23.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Tue, 2009-04-07 at 09:39 -0400, Dave Cramer wrote:
>
>
> On Tue, Apr 7, 2009 at 9:23 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com>
> wrote:
>
> On Tue, 2009-04-07 at 06:24 -0400, Dave Cramer wrote:
> >
> >
> > On Tue, Apr 7, 2009 at 4:35 AM, Hannu Krosing
> <hannu(at)2ndquadrant(dot)com>
> > wrote:
> > On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer
> wrote:
> > > huh ? What makes you think it doesn't deal with
> arrays ?
> >
> >
> > I have a sample function, whit takes an array
> argument
> >
> > CREATE OR REPLACE FUNCTION arraySum(
> > multiplier bigint,
> > valuelist bigint[],
> > OUT result int
> > ) AS
> > $$
> > BEGIN
> > result = 0;
> > FOR idx IN array_lower(valuelist,
> > 1)..array_upper(valuelist, 1) LOOP
> > result = result + multiplier *
> valuelist[idx];
> > END LOOP;
> > RETURN;
> > END;
> > $$ LANGUAGE plpgsql SECURITY DEFINER;
> >
> >
> > When I call this function directly via JDBC or using
> proxool I
> > get a
> > result, when doing it via c3p0 or dbcp I get an
> exception -
> >
> > Long[] array = { 1L, 2L };
> > PreparedStatement ps = conn.prepareStatement(
> > "SELECT * FROM arraySum(?, ?)");
> > ps.setLong(1, 3L);
> > ps.setArray(2, conn.createArrayOf("bigint",
> array));
> > ps.execute();
> >
> > OK, createArrayOf is a relatively new method. So .... you
> have a few
> > ways around this.
> >
> > 1) don't use it, create your own arrays.
> > 2) fix the dbcp code
> > 3) complain to dbcp people
>
>
> It's both dbcp and c3po.
>
> I understand that dbcp and c3po work on some other databases
> jdbc
> drivers, so maybe I could also do
>
> 4) fix jdbc code to provide required createArrayOf support
>
> no ?
>
> Well, the newer drivers support createArray, so perhaps you need a
> newer driver ?

As I said, yhis works when I use JDBC directly, or proxool connection
proxy

> As well as showing us the exception.

for dbcp -

java.lang.AbstractMethodError:
org.apache.tomcat.dbcp.dbcp.PoolingDataSource
$PoolGuardConnectionWrapper.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;

for c3p0 -

java.lang.AbstractMethodError:
com.mchange.v2.c3p0.impl.NewProxyConnection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;

Servlet code to test direct, proxool, c3po and dbcp attached

--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training

Attachment Content-Type Size
MyServlet.java text/x-java 4.0 KB

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: What do people use for connection pooling with PostgreSQL JDBC
Date: 2009-04-07 14:13:38
Message-ID: 49DB5F92.1060603@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hannu Krosing wrote:
> On Wed, 2009-04-08 at 01:25 +1200, Oliver Jowett wrote:
>> Hannu Krosing wrote:
>>
>>> I understand that dbcp and c3po work on some other databases jdbc
>>> drivers, so maybe I could also do
>>>
>>> 4) fix jdbc code to provide required createArrayOf support
>>>
>>> no ?
>> You could start by showing us the actual exception that you get?
>
> for dbcp -
>
> java.lang.AbstractMethodError:
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource
> $PoolGuardConnectionWrapper.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;
>
>
> for c3p0 -
>
> java.lang.AbstractMethodError:
> com.mchange.v2.c3p0.impl.NewProxyConnection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;

That means that neither dbcp nor c3po's connection wrapper classes
implement createArrayOf() (i.e. they were compiled against an earlier
JDBC specification that lacks those methods, but your runtime
environment is more recent and you are trying to use those methods from
your app). It is a problem with the connection pool wrapper code, not
the PostgreSQL JDBC driver. Perhaps you need to explicitly build
DBCP/C3PO against a newer JDBC release? Or perhaps they just don't
support those methods yet.

-O