I have a problem when I try to store more than 4000 characters in a Clob,
I followed what described in
http://www.hibernate.org/56.html. I created a StringClobType userType but there is the same error. What can I do?
Thanks in advance for any suggestion.
Hibernate version:
2.1.7
Mapping documents:
<property type="StringClobType" name="body" not-null="true" unique="false" update="true" insert="true">
<column name="BODY" length="5000" not-null="true" />
</property>
Code between sessionFactory.openSession() and session.close():
session = HibernateUtil.getSession();
Transaction tx = session.beginTransaction();
session.save(data);
tx.commit();
where data is a POJO with a field that refers the above mapping.
Full stack trace of any exception that occurs:
15:33:50,101 WARN JDBCExceptionReporter:57 - SQL Error: 17002, SQLState: null
15:33:50,101ERROR JDBCExceptionReporter:58 - Eccezione IO: Connection reset by peer: socket write error
15:33:50,101 WARN JDBCExceptionReporter:57 - SQL Error: 17002, SQLState: null
15:33:50,101ERROR JDBCExceptionReporter:58 - Eccezione IO: Connection reset by peer: socket write error
15:33:50,101 WARN JDBCExceptionReporter:57 - SQL Error: 17002, SQLState: null
15:33:50,195ERROR JDBCExceptionReporter:58 - Eccezione IO: Connection reset
15:33:50,195ERROR SessionImpl:2399 - Could not synchronize database state with session
15:33:50,195ERROR JDBCTransaction:90 - Rollback failed
java.sql.SQLException: Eccezione IO: Connection reset by peer: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:1380)
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:86)
at it.eng.nikko.infobean.ContentManager.insertContent(ContentManager.java:63)
at test.TestQuery.main(TestQuery.java:170)
Name and version of the database you are using:
ORACLE 9.2.0.1
The generated SQL (show_sql=true):
java.sql.SQLException: Eccezione IO: Connection reset by peer: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:1380)
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:86)
at it.eng.nikko.infobean.ContentManager.insertContent(ContentManager.java:63)
at test.TestQuery.main(TestQuery.java:170)
Debug level Hibernate log excerpt: