pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Support for JDK 1.5 RowSets
5+ messages / 3 participants
[nested] [flat]

* Support for JDK 1.5 RowSets
@ 2004-06-16 16:10  Kevin MacClay <kmacclay@vantage.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Kevin MacClay @ 2004-06-16 16:10 UTC (permalink / raw)
  To: pgsql-jdbc

JDBC Developers,

What are your plans for supporting the upcoming JDK 1.5 including
RowSets?  I tried using the CachedRowSet class with the latest build of
JDK 1.5 and the latest JDBC3 driver build, and ran into this error:

org.postgresql.util.PSQLException: This method is not yet implemented.
        at org.postgresql.Driver.notImplemented(Driver.java:413)
        at
org.postgresql.jdbc3.AbstractJdbc3DatabaseMetaData.locatorsUpdateCopy(Ab
stractJdbc3DatabaseMetaData.java:339)
        at
com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:691)
        at
com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:597)
        at
com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.j
ava:170)
        at
com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:727)

As I understand it, JDK 1.5 uses JDBC 3.0 (same as JDK 1.4).  The only
thing new here is the CachedRowSet.  The error seems to suggest that the
JDBC driver does not implement a method in the JDBC 3.0 spec that the
CachedRowSet now uses.

JDBC Driver: PG7.4 Build 214 JDBC3
JDK Version: JDK 1.5.0 Beta 3 Build 55
(let me know if you'd like a code sample)

Just so you know, I have tried the CachedRowSet class in a previous JDK
1.5 build and received a different error:

org.postgresql.util.PSQLException: A result was returned when none was
expected.
	at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1S
tatement.java:275)
	at
com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.j
ava:146)
	at
com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:583)
	at RowSetTest.testCachedRowSet1(RowSetTest.java:52)
	at RowSetTest.main(RowSetTest.java:19)

I was puzzled why the executeUpdate() method was getting invoked when I
was performing a SELECT.  It looks like something in the
CachedRowSetReader.readData() has changed (for the better?) in this
newer JDK build.

Thank you,
Kevin MacClay

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

* Re: Support for JDK 1.5 RowSets
@ 2004-06-16 17:54  Kris Jurka <books@ejurka.com>
  parent: Kevin MacClay <kmacclay@vantage.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Kris Jurka @ 2004-06-16 17:54 UTC (permalink / raw)
  To: Kevin MacClay <kmacclay@vantage.com>; +Cc: pgsql-jdbc



On Wed, 16 Jun 2004, Kevin MacClay wrote:

> JDBC Developers,
> 
> What are your plans for supporting the upcoming JDK 1.5 including
> RowSets?  I tried using the CachedRowSet class with the latest build of
> JDK 1.5 and the latest JDBC3 driver build, and ran into this error:
> 
> org.postgresql.util.PSQLException: This method is not yet implemented.
>         at org.postgresql.Driver.notImplemented(Driver.java:413)
>         at
> org.postgresql.jdbc3.AbstractJdbc3DatabaseMetaData.locatorsUpdateCopy(Ab
> stractJdbc3DatabaseMetaData.java:339)


The locatorsUpdateCopy method describes how LOBs are updated, but in the 
pg driver LOBs aren't updateable at all.  If your code is using JDBC large 
objects you're in trouble, but it's possible that the rowset 
implementation is just probing the driver for all possible attributes.

Could you retest with a version that I've changed to return true for this 
method?  I've put up a jar file here:

http://www.ejurka.com/pgsql/jars/

Kris Jurka



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

* Re: Support for JDK 1.5 RowSets
@ 2004-06-16 18:16  Kevin MacClay <kmacclay@vantage.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Kevin MacClay @ 2004-06-16 18:16 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

On Wed, 16 Jun 2004, Kris Jurka wrote:

> The locatorsUpdateCopy method describes how LOBs are updated, but in
the 
> pg driver LOBs aren't updateable at all.  If your code is using JDBC
large 
> objects you're in trouble, but it's possible that the rowset 
> implementation is just probing the driver for all possible attributes.
> 
> Could you retest with a version that I've changed to return true for
this 
> method?  I've put up a jar file here:
> 
> http://www.ejurka.com/pgsql/jars/
> 
> Kris Jurka

This worked!  I also tested updating back to the database with the
CachedRowSet, and that worked as well.  Will this change make it into
the next driver build?

I will do some more extensive testing of the JDK 1.5 RowSet classes this
week and let you know if I spot any other incompatibilities.

Thank you,
Kevin



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

* Re: Support for JDK 1.5 RowSets
@ 2004-06-16 18:31  Kris Jurka <books@ejurka.com>
  parent: Kevin MacClay <kmacclay@vantage.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Kris Jurka @ 2004-06-16 18:31 UTC (permalink / raw)
  To: Kevin MacClay <kmacclay@vantage.com>; +Cc: pgsql-jdbc



On Wed, 16 Jun 2004, Kevin MacClay wrote:

> On Wed, 16 Jun 2004, Kris Jurka wrote:
> 
> > Could you retest with a version that I've changed to return true for
> > this method?  I've put up a jar file here:
> > 
> > http://www.ejurka.com/pgsql/jars/
> 
> This worked!  I also tested updating back to the database with the
> CachedRowSet, and that worked as well.  Will this change make it into
> the next driver build?

I've made this change in both the 7.4 and 7.5 cvs trees.

Kris Jurka



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

* Re: Support for JDK 1.5 RowSets
@ 2004-06-17 04:54  Amit Handa <Amit.Handa@Sun.COM>
  parent: Kevin MacClay <kmacclay@vantage.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Amit Handa @ 2004-06-17 04:54 UTC (permalink / raw)
  To: Kevin MacClay <kmacclay@vantage.com>; +Cc: pgsql-jdbc

Hi Kevin, all,

Thanks for pointing these problems out!

We are already aware of these problems and these will be fixed in the next release of Tiger.

One point to note here is that we would like adoption of technology by industry/vendors
as it gets stabilised. It's been roughly 3 years since JDBC 3.0 came out
and we are getting ready for next release http://www.jcp.org/en/jsr/detail?id=221

All said, once again, we are aware of problems stated below
and trying to see how we can help the developer community and
industry leverage the new API's as they come.

thanks,
Amit Handa,
Sun Microsystems Inc.

Kevin MacClay wrote:
> JDBC Developers,
> 
> What are your plans for supporting the upcoming JDK 1.5 including 
> RowSets?  I tried using the CachedRowSet class with the latest build of 
> JDK 1.5 and the latest JDBC3 driver build, and ran into this error:
> 
> org.postgresql.util.PSQLException: This method is not yet implemented.
>         at org.postgresql.Driver.notImplemented(Driver.java:413)
>         at 
> org.postgresql.jdbc3.AbstractJdbc3DatabaseMetaData.locatorsUpdateCopy(AbstractJdbc3DatabaseMetaData.java:339)
> 
>         at 
> com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:691)
>         at 
> com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:597)
>         at 
> com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:170) 
> 
>         at 
> com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:727)
> 
> As I understand it, JDK 1.5 uses JDBC 3.0 (same as JDK 1.4).  The only 
> thing new here is the CachedRowSet.  The error seems to suggest that the 
> JDBC driver does not implement a method in the JDBC 3.0 spec that the 
> CachedRowSet now uses.
> 
> JDBC Driver: PG7.4 Build 214 JDBC3
> JDK Version: JDK 1.5.0 Beta 3 Build 55
> (let me know if you'd like a code sample)
> 
> Just so you know, I have tried the CachedRowSet class in a previous JDK 
> 1.5 build and received a different error:
> 
> org.postgresql.util.PSQLException: A result was returned when none was 
> expected.
>         at 
> org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:275) 
> 
>         at 
> com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:146) 
> 
>         at 
> com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:583)
>         at RowSetTest.testCachedRowSet1(RowSetTest.java:52)
>         at RowSetTest.main(RowSetTest.java:19)
> 
> I was puzzled why the executeUpdate() method was getting invoked when I 
> was performing a SELECT.  It looks like something in the 
> CachedRowSetReader.readData() has changed (for the better?) in this 
> newer JDK build.
> 
> Thank you,
> Kevin MacClay
> 







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


end of thread, other threads:[~2004-06-17 04:54 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-16 16:10 Support for JDK 1.5 RowSets Kevin MacClay <kmacclay@vantage.com>
2004-06-16 17:54 ` Kris Jurka <books@ejurka.com>
2004-06-17 04:54 ` Amit Handa <Amit.Handa@Sun.COM>
2004-06-16 18:16 Re: Support for JDK 1.5 RowSets Kevin MacClay <kmacclay@vantage.com>
2004-06-16 18:31 ` Kris Jurka <books@ejurka.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