Hi,
I am new to hibernate and would like to store a image using Blob in oracle database.
I am creating a java.sql.Blob instance using Hibernate.createBlob(InputStream in) method. But when i try to save the object into the database 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 oracle.jdbc.dbaccess.DBError.throwSqlException
(DBError.java:179)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch
(OraclePreparedStatement.java:4073)
mmm any ideas?