db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1599) Clob.getSubString() throws NullPointerException when created by updatable result set
Date Fri, 02 Nov 2007 12:33:52 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539570

Knut Anders Hatlen commented on DERBY-1599:

What I meant was that I'm fine with not fixing the combinations that don't work (that is,
update{Clob,Blob,*Stream} + get{Clob,Blob,*Stream} with no call to updateRow() in between)
if we instead make them fail gracefully ("reading updated blob/clob column is not supported
until updateRow() has been called"). I don't see any compelling reasons for restricting the
combinations that currently work (get + update). Of course, if we could make all combinations
work, that would be the best solution.

By the way, what's the correct return value from a getter right after a column has been modified
with one of the update methods? The old value or the updated value? Currently, we return the
new value, but perhaps we should return the old value until we have called updateRow()?

> Clob.getSubString() throws NullPointerException when created by updatable result set
> ------------------------------------------------------------------------------------
>                 Key: DERBY-1599
>                 URL: https://issues.apache.org/jira/browse/DERBY-1599
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions:,
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: Repro.java
> If you create a clob value with one of the ResultSet.updateXXX methods that take a stream
or a reader, and retrieve that value with ResultSet.getClob(), a NullPointerException will
be thrown when getSubString() is called on the returned Clob object. This happens with the
network client driver, and it has been observed on Derby and trunk.
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.derby.client.am.Clob.getSubStringX(Clob.java:229)
>         at org.apache.derby.client.am.Clob.getSubString(Clob.java:210)
>         at Repro.main(Repro.java:24)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message