-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: String to Clob throws java.io.IOException: Connection reset
PostPosted: Mon Jan 03, 2005 11:14 am 
Newbie

Joined: Mon Jan 03, 2005 10:48 am
Posts: 1
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:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.