-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
7.1.5.GA
-
None
This seems to be a regression as the issue was fixed in EAP 6.4.5 ref HHH-5255
Writing to a lazy loaded lob property of an entity leads to a ClassCastException during transaction commit when the lob property has not been accessed / lazily loaded before writing to it. The entity is annotated as follows
@Basic(fetch=FetchType.LAZY)
@LazyGroup("smallBlob")
@LazyToOne(LazyToOneOption.NO_PROXY)
Raw
- * Resulting exception
Raw
java.lang.ClassCastException: org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer$1 cannot be cast to java.sql.Blob
at org.hibernate.type.descriptor.java.BlobTypeDescriptor.areEqual(BlobTypeDescriptor.java:33)
at org.hibernate.type.AbstractStandardBasicType.isEqual(AbstractStandardBasicType.java:180)
at org.hibernate.type.AbstractStandardBasicType.isSame(AbstractStandardBasicType.java:170)
at org.hibernate.type.AbstractStandardBasicType.isDirty(AbstractStandardBasicType.java:206)
at org.hibernate.type.AbstractStandardBasicType.isDirty(AbstractStandardBasicType.java:202)
at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:322)
at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:4218)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:528)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:215)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:142)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:216)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:85)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:468)
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3159)
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2352)
- duplicates
-
JBEAP-15920 [GSS](7.2.z) HHH-12054 HHH-12592 HHH-12637 HHH-12555 Entity enhancements merge bugs
- Closed
- cloned from
-
HHH-12054 Loading...