pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) causing AbstractMethodError
3+ messages / 2 participants
[nested] [flat]

* PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) causing AbstractMethodError
@ 2006-12-14 04:39 Ken Johanson <pg-user@kensystem.com>
  2006-12-14 05:11 ` Re: PG 8.2's JDBC, and Statement.executeUpdate(String, Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ken Johanson @ 2006-12-14 04:39 UTC (permalink / raw)
  To: pgsql-jdbc

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).

Is there anything I should check in terms of my settings? I recall 
seeing a discussion about prepared stmts being server side now, not in 
the driver... and I am using the 'stringtype=unspecified' JDBC URL 
parameter; not sure if this could be related.

Thanks in advance,

ken





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: PG 8.2's JDBC, and Statement.executeUpdate(String,
  2006-12-14 04:39 PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) causing AbstractMethodError Ken Johanson <pg-user@kensystem.com>
@ 2006-12-14 05:11 ` Kris Jurka <books@ejurka.com>
  2006-12-14 05:18   ` Re: PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) Ken Johanson <pg-user@kensystem.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Kris Jurka @ 2006-12-14 05:11 UTC (permalink / raw)
  To: Ken Johanson <pg-user@kensystem.com>; +Cc: pgsql-jdbc



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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: PG 8.2's JDBC, and Statement.executeUpdate(String, String[])
  2006-12-14 04:39 PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) causing AbstractMethodError Ken Johanson <pg-user@kensystem.com>
  2006-12-14 05:11 ` Re: PG 8.2's JDBC, and Statement.executeUpdate(String, Kris Jurka <books@ejurka.com>
@ 2006-12-14 05:18   ` Ken Johanson <pg-user@kensystem.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Ken Johanson @ 2006-12-14 05:18 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-12-14 05:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-14 04:39 PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) causing AbstractMethodError Ken Johanson <pg-user@kensystem.com>
2006-12-14 05:11 ` Re: PG 8.2's JDBC, and Statement.executeUpdate(String, Kris Jurka <books@ejurka.com>
2006-12-14 05:18   ` Re: PG 8.2's JDBC, and Statement.executeUpdate(String, String[]) Ken Johanson <pg-user@kensystem.com>

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