This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Inserting a blob using hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Inserting a blob using hibernate" Watch "Inserting a blob using hibernate" New topic
Author

Inserting a blob using hibernate

shri mon
Ranch Hand

Joined: Jan 11, 2005
Posts: 63
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

Joined: Dec 16, 2004
Posts: 148
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting a blob using hibernate