Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In a comment you said:</p> <blockquote> <p><code>clob.getSubString(0, clob.length())</code> throws: <code>java.sql.SQLException: Invalid argument(s) in call at oracle.sql.CLOB.getSubString(CLOB.java:236)</code> while <code>clob.length()</code> returns actual length of my clob</p> </blockquote> <p>The documentation of <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Clob.html#getSubString%28long,%20int%29" rel="nofollow"><code>getSubString</code></a> states that:</p> <blockquote> <p>pos - the first character of the substring to be extracted. The first character is at position 1.</p> </blockquote> <p>With a simple function to generate and return a CLOB, I can retrieve it over JDBC (<code>ojdbc5</code> or <code>ojdbc6</code>) with no problems, either with <code>getCLOB()</code> or <code>getString()</code>. But if I try to assign the <code>Oracle.sql.CLOB</code> retrieved with <code>getCLOB</code> to a <code>String</code> using</p> <pre><code>String x = getSubString(0, clob.length()); </code></pre> <p>then I also get the <code>Invalid argument(s) in call</code> error. Just changing that to:</p> <pre><code>String x = getSubString(1, clob.length()); </code></pre> <p>works. So it seems to have nothing to do with the temporary allocation in the function, or the CLOB size. I don't understand why you didn't have a problem with smaller CLOBs - maybe your logic just didn't hit this if they were small?</p> <p>In the meantime you've worked around this with <code>clob.getCharacterStream().read()</code>, so this may be a bit irrelevant now.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload