Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System or internal error java.lang.ClassCastException: oracle.sql.BLOB

 
Abhinav Sahai
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to read Blob from Oracle and insert the same in Informix database. But while inserting I am getting this exception:

org.hibernate.exception.GenericJDBCException: could not insert: [businessobject.TestObject]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2078)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2427)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at ros.pai.dms2dms.controller.DMS2DMSController.main(DMS2DMSController.java:52)
Caused by: java.sql.SQLException: System or internal error java.lang.ClassCastException: oracle.sql.BLOB
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:448)
at com.informix.jdbc.IfxPreparedStatement.setBlob(IfxPreparedStatement.java:3727)
at org.hibernate.type.BlobType.set(BlobType.java:49)
at org.hibernate.type.BlobType.nullSafeSet(BlobType.java:117)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1826)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1803)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2059)
... 11 more

Please help!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic