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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Error (ORA-21560 and ORA-06512) while converting the CLOB data of length 75K into String or Reader or InputStream?

Re: Oracle Error (ORA-21560 and ORA-06512) while converting the CLOB data of length 75K into String or Reader or InputStream?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 02 Nov 2003 23:33:20 -0800
Message-ID: <1067844819.29607@yasure>


Abhisek wrote:

>Hi,
>
>When I am trying to retrieve the CLOB data of length of ~75KB from the
>Oracle database using JDBC (oracle.sql.CLOB) and converting it to
>String by using subString function of oracle.sql.CLOB, I am getting
>the following exception:
>
>java.sql.SQLException: ORA-21560: argument 2 is null, invalid, or out
>of range
>ORA-06512: at "SYS.DBMS_LOB", line 715
>ORA-06512: at line 1
>
>at java.lang.Throwable.fillInStackTrace(Native Method)
>at java.lang.Throwable.fillInStackTrace(Compiled Code)
>at java.lang.Throwable.<init>(Compiled Code)
>at java.lang.Exception.<init>(Compiled Code)
>at java.sql.SQLException.<init>(Compiled Code)
>at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
>at oracle.jdbc.ttc7.Oall7.receive(Compiled Code)
>at oracle.jdbc.ttc7.TTC7Protocol.doOall7(Compiled Code)
>at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(Compiled Code)
>at oracle.jdbc.driver.OracleStatement.doExecuteOther(Compiled Code)
>at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(Compiled
>Code)
>at oracle.jdbc.driver.OracleStatement.doExecute(Compiled Code)
>at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(Compiled
>Code
>)
>at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(Compiled
>Cod
>e)
>at oracle.jdbc.driver.OraclePreparedStatement.execute(Compiled Code)
>at oracle.sql.CLOB.plsql_read(Compiled Code)
>at oracle.jdbc.ttc7.TTC7Protocol.lobRead(Compiled Code)
>at oracle.sql.CLOB.getChars(Compiled Code)
>at oracle.sql.CLOB.getSubString(Compiled Code)
>
>It is working fine for the data upto the size of 30K.
>
>Can you please let me know is there any limit on fetching the CLOB
>data as a String or as a Character Stream? Is there any way to fetch
>the CLOB data of any length (upto 2MB) into the String class or as the
>character stream (as Reader) or in a InputStream?
>
>I used APIs getSubString(), getAsciiStream and getCharStream to read
>the data from the clob but in all cases I am getting the exception
>with same oracle error.
>
>I am fetching the data from the database in the servlet for the
>internal use in the servlet.
>
>Please help me out.
>
>Regards
>Abhishek
>
>

What version of Oracle? I can't think of any version that has a 2MB CLOB.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Mon Nov 03 2003 - 01:33:20 CST

Original text of this message

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