Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> dbms_lob.read errors out with ORA-21560

dbms_lob.read errors out with ORA-21560

From: El Toro <medawsonjr_at_yahoo.com>
Date: 9 Jul 2003 22:20:13 -0700
Message-ID: <2e1cd2b.0307092120.1e1e8740@posting.google.com>


OS: Solaris 2.6
RDBMS: Oracle 8.1.7.0
CharSet: UTF8
CLOB Data: Chinese

We're experiencing a problem with a JDBC app that retrieves CLOBs from a table. On about 3 or 4 of the CLOBs, the app errors out with 'DBMS_LOB.READ: ORA-21560 - argument is null, invalid, or out of range'. However, the other rows with their associated CLOBs can be read w/o issue.

Note in the error that there is a glaring space between the words "argument" and "is". According to Oracle, the normal error should specify an index of the argument list, such as 2 or 3, right in the space between those two words. Not so in this case.

I tested it with a small PL/SQL script, attempting to read in the maximum allowable 32k increments with dbms_lob.read, and failed with the exact same error on those same rows. Here's the kicker: If I simply reduce the read increment in the argument to dbms_lob.read to between 16k - 20k, all the records can be read just fine.

Also, *all* rows are able to be read with dbms_lob.substr(loc, 32767,1) w/o issue.

I see that others have had this error before working with CLOBs, but there have been no resolutions posted to their postings. Any help will be greatly appreciated. Received on Thu Jul 10 2003 - 00:20:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US