I want to store a image using Blob in oracle database but this error appears:
org.hibernate.exception.GenericJDBCException: could not insert: [user.Product]
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1683)
at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:2012)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:42)
at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:137)
at org.hibernate.event.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:255)
at org.hibernate.event.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:814)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:75)
at user.ProductDetails.saveProduct(ProductDetails.java:21)
at user.TempRunner.main(TempRunner.java:26)
Caused by: java.sql.SQLException: operation not allowed: streams type cannot be used in batching
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:4073)
at com.mchange.v2.sql.filter.FilterPreparedStatement.addBatch(FilterPreparedStatement.java:74)
at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:29)
at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1667)
What's wrong?