pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Johanson <pg-user@kensystem.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PG 8.2's JDBC, and Statement.executeUpdate(String, String[])
Date: Wed, 13 Dec 2006 22:18:31 -0700
Message-ID: <4580DEA7.2030604@kensystem.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0612140008120.28047@leary2.csoft.net>
References: <4580D56A.10400@kensystem.com>
	<Pine.BSO.4.64.0612140008120.28047@leary2.csoft.net>

Kris Jurka wrote:
> 
> 
> On Wed, 13 Dec 2006, Ken Johanson wrote:
> 
>> Hello all,
>>
>> I'm getting a:
>>
>> AbstractMethodError: 
>> org.postgresql.jdbc2.Jdbc2Statement.executeUpdate(Ljava/lang/String;[Ljava/lang/String;)I 
>>
>>
>> when I call Statement.executeUpdate(String, String[]) on the PG 8.2 
>> distro's JDBC driver (I did not check any other versions).
>>
> 
> executeUpdate(String, String[]) is a JDBC3 method, but you are evidently 
> using a JDBC2 driver.  When you use a JDBC3 driver you will get a 
> SQLException reporting that this method is not implemented if you
> supply anything other than an array of zero length.  Actually this 
> should probably also allow a null array as now it will throw a NPE when 
> it shouldn't.
> 
> Kris Jurka
> 
> 
> 
> 

Thank you Kris. Yes, I just now noticed that. Had both 2 and 3 drivers 
in my classpath. Removed the V2 drivers, but now I get a:

org.postgresql.util.PSQLException: Returning autogenerated keys is not 
supported

I'll have to do some searching to find out why this features isn't 
supported (unless someone has quick pointers to docs :).

Thank you again,

Ken





view thread (3+ messages)

Message-ID: <4580DEA7.2030604@kensystem.com>
Permalink:  ../4580DEA7.2030604@kensystem.com/
Also on:    postgresql.org/message-id/4580DEA7.2030604@kensystem.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg-user@kensystem.com, books@ejurka.com
  Subject: Re: PG 8.2's JDBC, and Statement.executeUpdate(String, String[])
  In-Reply-To: <4580DEA7.2030604@kensystem.com>
  References: <4580D56A.10400@kensystem.com> <Pine.BSO.4.64.0612140008120.28047@leary2.csoft.net> <4580DEA7.2030604@kensystem.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox