Merging a blob on an entity results in a class cast exception

Description

Merging an entity with a blob results in a class cast exception:

Test case: https://github.com/nikowitt/hibernate-test-case-templates/tree/HHH-12555

Environment

None

Activity

Show:
Ka Wu
March 25, 2021, 12:24 PM

The Hibernate release page for 5.2 hasn’t been updated to 5.2.18.Final ever since. Should be updated soon. See https://discourse.hibernate.org/t/backporting-hhh-12555-to-5-2/5213. Sorry for the inconvenience.

Ka Wu
March 25, 2021, 8:33 AM

Sorry, seems to be the backport for 5.2.18, as its been tagged that way.

New question: when will Hibernate 5.2.18 be released, given that the last one was created 2018-04-26…?

Ka Wu
March 25, 2021, 5:47 AM

Ugh. We just ran into this in a WebLogic 12c, Java EE 7 environment:

We’re using 5.2.17, the latest and greatest Hibernate for this setup, but this fix is not in there and really forces us to use two entities for all cases where we have images/documents stored as byte[] + lazy loading. This makes several things much more complicated than they’d have to be.

5.2.17 is from 2018-04-26 and this issue was submitted 2 weeks after that release.

Any chance to get this backported to 5.2, even after so many years? (there’s absolutely no way to upgrade the server…)

Gail Badner
December 18, 2018, 5:31 PM

Pushed to 5.3 branch as well.

Guillaume Smet
November 29, 2018, 10:13 AM

I integrated the original test in the PR here: https://github.com/hibernate/hibernate-orm/pull/2390

We need to decide if we still want to keep the UNFETCHED_PROPERTY code in the types or get rid of it and use the other approach (or both).

Fixed

Assignee

Guillaume Smet

Reporter

Niko Wittenbeck

Fix versions

backPortable

Backport?