Lob proxy class loading problem

Description

Creating blob within quartz scheduled job workmanager thread gives us following exception:

Following change in SerializableBlobProxy resolves issue:

But is it correct solution?

Similar issue is described here https://hibernate.atlassian.net/browse/HHH-3529

Environment

websphere 7.0.0.25, quartz 1.8.6, spring 3.0.7, hibernate 3.6.4.Final, Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

Activity

Show:
Gail Badner
July 10, 2014, 5:58 AM

Closing resolved issued in preparation for releasing 4.3.6.

Gail Badner
July 10, 2014, 2:41 AM

Fixed in master, 4.3, and 4.2.

Gail Badner
July 9, 2014, 2:48 AM
Edited

This affects the following classes: BlobProxy, ClobProxy, NClobProxy, SerializableBlobProxy, SerializableClobProxy. I'll make a change to their getProxyClassLoader() methods using the appropriate Hibernate interface.

I am not changing ResultSetWrapperProxy, since it generates a proxy with interface ResultSet (i.e. it is not a Hibernate interface).

Some usages of ReflectHelper and SerializationHelper could also be affected by the Spring bug. I'm not going to deal with them here though. Please open a new Jira if you run into it.

PetrH
May 29, 2014, 2:07 PM

Of course it's still valid bug for 4.x since the particular code hasn't been touched in any helpful manner.
The cause is related to the following issue: https://jira.spring.io/browse/SPR-11125 which in short is that the context classloader may become different than what you optimistically expect (because of what's described in that linked issue) and because your code just checks whether it's null, it won't get it right. The issue affects SerializableBlobProxy and SerializableClobProxy getProxyClassLoader methods. The quick fix is to skip obtaining the context classloader and just use the 2nd option - classloader that loaded the WrappedBlob.class etc.

Brett Meyer
April 7, 2014, 5:43 PM

In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.

If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.

Thank you!

Fixed

Assignee

Gail Badner

Reporter

Peter Prokopcak

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major