Two Laptop Bag*
The moose likes JDBC 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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error writing greater than 4000 chars to CLOB" Watch "Error writing greater than 4000 chars to CLOB" New topic
Author

Error writing greater than 4000 chars to CLOB

Jon Wynett
Greenhorn

Joined: Jun 28, 2004
Posts: 10
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

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


Cheers!<br /><b>Annie</b>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error writing greater than 4000 chars to CLOB
 
Similar Threads
select with an "in" clause...
init.ora parameter HELP
ORACLE JDBC ERROR ORA-00600
invalid host/bind variable name
Insert file to Oracle's BLOB