We're updating the issue view to help you get more done. 

JavassistLazyInitializer.getProxy ClassCastException

Description

The javassist proxies of classes that declare getHandler() method lead to ClassCastException in org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.

This is caused by change JASSIST-144 in javassist 3.16. This change deprecates ProxyObject interface and introduces new less intrusive interface Proxy. The new interface does not declare getHandler() method that would conflict with target object's method of the same name.

The solution:

  • replace interface ProxyObject by Proxy

  • replace calls proxyObject.getHandler() by static ProxyFactory.getHandler(proxyObject).

Environment

any

Status

Assignee

Brett Meyer

Reporter

Petr Janata

Fix versions

Labels

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.3.0.CR2
4.2.7.SP1

Priority

Major