Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2100278 | 5.0 | Amit Handa | P3 | Resolved | Fixed | rc |
CachedRowSet.populate() fails with SQLException because some drivers have not
implemented locatorsUpdateCopy().
Inside the populate() method initMetaData() is called which calls the locatorUpdateCopy() method for blobs and clobs. If this is not implemented by JDBC drivers it fails throwing SQLException.
This causes CachedRowSets not to work
###@###.### 2004-06-24
Same problem has been reported by a CAP member:
We have identified and confirmed a high priority bug with the JDBC
RowSet implementation of your current build of JDK 1.5. The bug makes
the RowSet unusable with the PostgreSQL database (and possibly others).
As a CAP member, we suggest very high urgency on this bug as it may
cause the RowSet not to support other databases.
Here is an overview:
The RowSet gathers some initial metadata when first being used. This
calls the locatorsUpdateCopy() of the JDBC driver. This method is meant
to describe how LOBs are updated, but in the case of PostgreSQL (and
maybe other databases), LOBs aren't updateable at all. The PostgreSQL
driver chooses to throw an exception at this point. Since the RowSet
doesn't catch this exception, it stops the entire rest of the RowSet
from being used. A simple change is needed to gracefully catch this
exception.
Stacktrace when using RowSet with PostgreSQL:
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)
Please let me know if you need more information.
implemented locatorsUpdateCopy().
Inside the populate() method initMetaData() is called which calls the locatorUpdateCopy() method for blobs and clobs. If this is not implemented by JDBC drivers it fails throwing SQLException.
This causes CachedRowSets not to work
###@###.### 2004-06-24
Same problem has been reported by a CAP member:
We have identified and confirmed a high priority bug with the JDBC
RowSet implementation of your current build of JDK 1.5. The bug makes
the RowSet unusable with the PostgreSQL database (and possibly others).
As a CAP member, we suggest very high urgency on this bug as it may
cause the RowSet not to support other databases.
Here is an overview:
The RowSet gathers some initial metadata when first being used. This
calls the locatorsUpdateCopy() of the JDBC driver. This method is meant
to describe how LOBs are updated, but in the case of PostgreSQL (and
maybe other databases), LOBs aren't updateable at all. The PostgreSQL
driver chooses to throw an exception at this point. Since the RowSet
doesn't catch this exception, it stops the entire rest of the RowSet
from being used. A simple change is needed to gracefully catch this
exception.
Stacktrace when using RowSet with PostgreSQL:
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)
Please let me know if you need more information.
- backported by
-
JDK-2100278 populate fails with SQLException because locatorsUpdateCopy is not implemented
-
- Resolved
-