Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error writing greater than 4000 chars to CLOB

 
Jon Wynett
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:

I'm using Oracle10g with the thin client and trying to write data to a CLOB column. My code works fine for 4000 chars or less. More chars causes the exception shown below. Code is also shown here. Thanks for your help.

InputStream is = new ByteArrayInputStream(value.getBytes());
ps.setAsciiStream(idx, is, value.getBytes().length);
======

java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:985)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:746)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:705)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:381)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2076)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1986)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2697)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at com.evermind.sql.PreparedStatementBCELProxy.executeUpdate(PreparedStatementBCELProxy.java:46)
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can check
here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic