Hi all -
Does anyone have any experience using the ClobStringType with Oracle?
I'm having problems using Spring's OracleLobHandler. I have a CLOB field in my database that is mapped to a String in hibernate domain object using ClobStringType. The problem occurs when I try to save a new object to the database - I get the error below.... It appears as though my connection is closed..!?
Any ideas? Has anyone successfully used this feature of Spring in conjunction with Hibernate? If so, are there some examples you could share?
Thanks in advance,
Joe
=====>
org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is java.io.IOException: No more data to read from socket
java.io.IOException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
at oracle.jdbc.driver.OracleClobWriter.flush(OracleClobWriter.java:204)
at org.springframework.jdbc.support.lob.OracleLobHandler$3.populateLob(OracleLobHandler.java:268)
at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:335)
at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:262)
at org.springframework.orm.hibernate.support.ClobStringType.nullSafeSet(ClobStringType.java:87)
at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118)
at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:466)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2414)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2367)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2236)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:386)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:316)
....
|