 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Abhisek Guest
|
Posted: Mon Nov 03, 2003 6:18 am Post subject: Oracle Error (ORA-21560 and ORA-06512) while converting the |
|
|
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
|
|
| Back to top |
|
 |
Daniel Morgan Guest
|
Posted: Mon Nov 03, 2003 7:33 am Post subject: Re: Oracle Error (ORA-21560 and ORA-06512) while converting |
|
|
Abhisek wrote:
| Quote: | 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@x.washington.edu
(replace 'x' with a 'u' to reply)
|
|
| Back to top |
|
 |
Abhisek Guest
|
Posted: Mon Nov 03, 2003 10:39 am Post subject: Re: Oracle Error (ORA-21560 and ORA-06512) while converting |
|
|
Daniel Morgan <damorgan@x.washington.edu> wrote:
| Quote: | What version of Oracle? I can't think of any version that has a 2MB CLOB.
|
Hi Daniel,
I am using Oracle 9i client on Solaris with Oracle 9i server (also
on Solaris).
The clob data type in Oracle can store upto 4 GB of data. Please
correct me if I am wrong.
Regards
Abhishek
|
|
| Back to top |
|
 |
Daniel Morgan Guest
|
|
| Back to top |
|
 |
Brian Peasland Guest
|
Posted: Tue Nov 04, 2003 12:46 am Post subject: Re: Oracle Error (ORA-21560 and ORA-06512) while converting |
|
|
You might want to check out the following link from AskTom where he shows
how to read a CLOB using Java/JDBC:
http://asktom.oracle.com/pls/ask/f?p=4950:8:6997409950300052730::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1310802216301,
HTH,
Brian
On Monday 03 November 2003 00:18, Abhisek thoughtfully contributed:
| Quote: | 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
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|