Issue Details (XML | Word | Printable)

Key: NUCRDBMS-402
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Alexey Sushko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Derby 10.6.1.0 and BLOB/CLOB [DERBY-3844]

Created: 31/May/10 05:03 AM   Updated: 27/Jun/10 08:57 AM   Resolved: 11/Jun/10 01:37 PM
Component/s: Types
Affects Version/s: 2.1.0.m3
Fix Version/s: 2.1.1

File Attachments: 1. Zip Archive blob-test.zip (5 kB)
2. Text File model.TestVersion.txt (25 kB)

Environment: Derby 10.6.1.0


 Description  « Hide
I'm trying a new version of Derby 10.6.1.0
There is a simple object with a string field jdbcType = "CLOB".
In the first method JUnit test open PersitentManager and transaction add two objects.
In the second method, JUnit test PersitentManager open and read all the entries of this class.

Query query = pm.newQuery(Data.class);
for(Version version : list) {
   System.out.println("read record " + (++index));
}

After the first start in the base came 2 records. The second test gave an error:
   SQLException: "Stream or LOB value cannot be retrieved more than once"

Repeat the test. Now in the base 4 entries. The second method of test shall, reading 2 lines and 3 iterations gives a similar message.

Derby 10.5.3.0 - no error.

Andy Jefferson added a comment - 09/Jun/10 03:39 PM
I see no test. I see no stack trace.

Alexey Sushko added a comment - 09/Jun/10 09:35 PM
The archive is a test. At the end of the file pom.xml you can change the version of the derby.
If you 10.5.3.0_1, no errors.
When choosing 10.6.1.0 error appears.

File a stack error - model.TestVersion.txt.

Alexey Sushko made changes - 09/Jun/10 09:35 PM
Field Original Value New Value
Attachment blob-test.zip [ 11210 ]
Attachment model.TestVersion.txt [ 11211 ]
Andy Jefferson added a comment - 10/Jun/10 03:02 PM
So mark the BLOB/CLOB field as not part of the fetch plan for the query, and so it is lazy loaded (and hence not read at that point). Add to the fetch plan used for detach.

Andy Jefferson added a comment - 11/Jun/10 01:37 PM
SVN trunk actually implements a different way of loading objects from a ResultSet (NUCCORE-544). That means that this item doesn't occur

Andy Jefferson made changes - 11/Jun/10 01:37 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.1.1 [ 10991 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 27/Jun/10 08:57 AM
Status Resolved [ 5 ] Closed [ 6 ]