Function not found with JDBC 8.0 driver and later

From: Donny Tjandra <dtjandra(at)pcthome(dot)com>
To: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Function not found with JDBC 8.0 driver and later
Date: 2005-06-15 19:13:42
Message-ID: E4987A7A1042D511848F0008C71BB06B04D8EC02@PCT_EXCH
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm running PostgreSQL 8.0.3 for Windows. In the database I have a function
defined like this:

CREATE OR REPLACE FUNCTION get_property_list2(text, date, int4, int4)
...

The parameters are passed from JDBC like this:

PreparedStatement ps
ps.setInt(3, ((Integer)queryParameters[2]).intValue());
ps.setLong(4, ((Long)queryParameters[3]).longValue());

With pg73jdbc3.jar the function call works fine. With pg80b1.308.jdbc3.jar
or postgresql-8.0-311.jdbc3.jar, the driver can't seem to recognize the
database function. I get stack trace as shown below. Seems like there's a
mismatch with long integer type mapping between 8.0+ JDBC drivers and
PostgreSQL? Can this be looked at for future release of the driver? Thanks.

java.sql.SQLException: ERROR: function get_property_list2(character varying,
date, integer, bigint) does not exist
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorI
mpl.java:1471)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.ja
va:1256)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j
ava:389)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2St
atement.java:330)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statem
ent.java:240)
at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
ingPreparedStatement.java:92)

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2005-06-15 20:03:10 Re: Function not found with JDBC 8.0 driver and later
Previous Message Oliver Jowett 2005-06-15 13:37:09 Re: patch for passing the cts