Share

TriActive Java Data Objects (TJDO)

Tracker: Bugs

5 UTF-8 Oracle Clob retrieval broken - ID: 1099152
Last Update: Comment added ( studerby )

On an Oracle DB, if a CLOB contains any non-Ascii
data, it's munged on retrieval. (In TJDO, CLOBs are
used to persist very very large strings; max length >
either 2k or 4k, I think.) Ascii strings stored in
CLOBs are not affected.

The problem is obvious, in the
com.triactive.tjdo.store.OracleCobMapping.getString()
method.

A *preliminary* patch file for TJDO 2.0 and for TJDO
2.1 will be attached; we're still evaluating this fix.
The changes are actually the same, just to different lines.


Stu Derby ( studerby ) - 2005-01-09 23:02

5

Closed

Fixed

Mike Martin

None

None

Public


Comments ( 3 )

Date: 2005-03-03 17:09
Sender: studerby

Logged In: YES
user_id=571367

BTW, unrelated to this bug, but looking a bit like it,
there's an Oracle driver bug with:

8.1.7 thin driver
Java 1.4
CLOBs containing multibyte characters, longer than 10 kb
or so; it varies, depending on the width of the multi-byte
characters. For at least one 2-byte character, retrival
fails on a CLOB that is 16,257 repetitions of that character.

The driver throws an exception reading the character stream
that looks like:
javax.jdo.JDODataStoreException: Error reading Oracle CLOB
object: param = 1
NestedThrowables:
java.io.IOException: ORA-21560: argument is null, invalid,
or out of range
ORA-06512: at "SYS.DBMS_LOB", line 648
ORA-06512: at line 1

As I said, this is Oracle's bug, not TJDOs; however Oracle
says that the 8.1.7 driver is not certified w/ Java 1.4 and
the solution is to upgrade drivers, if possible.

I've got a working work-around for this Oracle bug, for
TJDO, but I'm doubtful that this should go into the regular
code base, it seems like a "legacy" issue.


Date: 2005-01-23 18:23
Sender: jackknifebarberProject Admin

Logged In: YES
user_id=582193

Fixed in OracleClobMapping 1.9.

Mike


Date: 2005-01-09 23:12
Sender: studerby

Logged In: YES
user_id=571367

The 2.1 patch is attached; it differs from 2.0 only by line
number and currently will also work on the HEAD of the CVS
tree also (since there are no chances since the 2.1 release).


Attached Files ( 2 )

Filename Description Download
OracleClobMapping.patch.2.0 Patch for TJDO 2.0 Download
OracleClobMapping.patch.2.1 OracleClobMapping.patch.2.1 Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2005-01-23 18:23 jackknifebarber
resolution_id None 2005-01-23 18:23 jackknifebarber
assigned_to nobody 2005-01-23 18:23 jackknifebarber
close_date - 2005-01-23 18:23 jackknifebarber
File Added 115181: OracleClobMapping.patch.2.1 2005-01-09 23:12 studerby
File Added 115180: OracleClobMapping.patch.2.0 2005-01-09 23:02 studerby