Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.1 beta 5
Full stack trace of any exception that occurs:
Blobs may not be accessed after serialization
Stack Trace:
* org.hibernate.lob.SerializableBlob.getWrappedBlob(SerializableBlob.java:23)
* org.hibernate.lob.SerializableBlob.getBinaryStream(SerializableBlob.java:39)
* nl.huib.swiet.dao.impl.hibernate.ItemDAOImpl.saveOrUpdateItem(ItemDAOImpl.java:155)
* nl.huib.swiet.service.shop.ItemService.saveOrUpdateItem(ItemService.java:49)
* nl.huib.swiet.service.shop.ItemService$$FastClassByCGLIB$$b5303db5.invoke(<generated>)
* net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
* org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:661)
* org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
* org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
* org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
* org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:606)
* <censored>.ItemService$$EnhancerByCGLIB$$5dd13c60.saveOrUpdateItem(<generated>)
Name and version of the database you are using: MySQL 4.1
The generated SQL (show_sql=true):
Hibernate: update item set sold=?, width=?, height=?, thumbnail_medium=?, stock=?, name_nl=?, description_en=?, description_nl=?, name_en=?, buy_price=?, buy_date=?, in_shop=?, new_item=?, archived=?, sale_price=?, depth=? where id=?
Hi,
I have a problem updating a class which has a blob in it. During the operation I only loaded it via another object, so the blob probably isn't initialized (lazy is default). Then I set just a simple property on the object and call saveOrUpdate, which generates the above exception. I check the code and it seems the internal blob is null.
Could this be a bug, am I doing something wrong? I'm using annotations and I do not add anything to the blob getter, so I'm using defaults.
Regards,
Wouter