The moose likes JDBC and Relational Databases and the fly likes Error writing greater than 4000 chars to CLOB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Error writing greater than 4000 chars to CLOB" Watch "Error writing greater than 4000 chars to CLOB" New topic

Error writing greater than 4000 chars to CLOB

Jon Wynett

Joined: Jun 28, 2004
Posts: 10

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(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.check_error(
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(
at oracle.jdbc.ttc7.Oall7.receive(
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(
at oracle.jdbc.driver.OracleStatement.executeNonQuery(
at oracle.jdbc.driver.OracleStatement.doExecuteOther(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(
at com.evermind.sql.FilterPreparedStatement.executeUpdate(
at com.evermind.sql.FilterPreparedStatement.executeUpdate(
at com.evermind.sql.PreparedStatementBCELProxy.executeUpdate(
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
You can check

Cheers!<br /><b>Annie</b>
I agree. Here's the link:
subject: Error writing greater than 4000 chars to CLOB
It's not a secret anymore!