• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inserting a blob using hibernate

 
shri mon
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the following error while trying to insert a blob in an oracle db while using hibernate.


java.lang.UnsupportedOperationException: Blob may not be manipulated from creating session
at org.hibernate.lob.BlobImpl.excep(BlobImpl.java:104)
at org.hibernate.lob.BlobImpl.getBytes(BlobImpl.java:50)
at hibernate.util.HibernateDBHelper.uploadAsset(HibernateDBHelper.java:163)
at com.statestreet.gsl.sle.auction.bean.UploadAssetBean.execute(UploadAssetBean.java:112)
at com.statestreet.gsl.sle.auction.controller.AuctionServlet.forward(AuctionServlet.java:183)
at com.statestreet.gsl.sle.auction.controller.AuctionAdminController.redirectTo(AuctionAdminController.java:71)
at com.statestreet.gsl.sle.auction.controller.AuctionAdminController.doPost(AuctionAdminController.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.statestreet.gsl.sle.auction.controller.AuctionServlet.service(AuctionServlet.java:283)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:523)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:125)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)


Thanks in advance.

Shrimon.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out hibernate forum for this. you will find number of posts and solutions. on hibernate.org Wiki community area also you will find solutions, advise on this.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!