We have just changed a long string column to have Hibernate mapping "text" which maps to Oracle "clob". On Oracle, we are now getting the exceptions below (cannot batch insert stream types).
Is there a way to set the JDBC batch size to 0
only within one transaction and one session? JDBC batch updating is working great everywhere else and we do not want to turn it off globally -- we only want to disable it for transactions where we insert these clob-containing rows. Is this possible?
Hibernate version: 2.1.1
Mapping documents: We just changed one of our tables to map a long string field as type "text".
Full stack trace of any exception that occurs:
Code:
[RMI TCP Connection(64)-10.0.0.30] 2004-10-15 10:42:14,976 : ERROR - JDBCExceptionReporter.logExceptions : operation not allowed: streams type cannot be used in batching
[RMI TCP Connection(64)-10.0.0.30] 2004-10-15 10:42:14,977 : ERROR - JDBCException.<init> : could not insert: [com.nimblefish.core.domain.function.Rule#4705]
java.sql.SQLException: operation not allowed: streams type cannot be used in batching
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:2781)
at net.sf.hibernate.impl.BatchingBatcher.addToBatch(BatchingBatcher.java:30)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:469)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
at com.nimblefish.core.persist.Persistence.flush(Persistence.java:412)
at com.nimblefish.sdk.ejb.session.FunctionServiceBean.createRule(FunctionServiceBean.java:96)
Name and version of the database you are using:
Oracle 9i