db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1599) Clob.getSubString() throws NullPointerException when created by updatable result set
Date Thu, 07 May 2009 19:16:45 GMT

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

Kristian Waagan commented on DERBY-1599:
----------------------------------------

Thinking about how we can solve this, I think the method is straight forward with the embedded
driver; read the user stream and save the data to a temporary location, then create a stream
from the temporary copy and give it to the user. Doing this will require some changes.
With the client driver there are more options;
 a) Transfer the content of the stream to the server and use the same mechanism as for the
embedded driver.
 b) Store the content on disk on the client. Works, but where should the client store the
data? The data volume would be up to ~6 GB (2G characters, 3 bytes each).
 c) Store the content in memory on the client. This will fail for large enough streams.
 d) Hybrid solution (optimizations; c+a, c+b or maybe even c+b+a).

Of course, before starting to implement a solution we should agree on what the behavior shall
be.

> 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: 10.1.3.1, 10.2.1.6
>            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 10.1.3.1 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.


Mime
View raw message