Uploaded image for project: 'Hibernate ORM'
  1. HHH-8748

JavassistLazyInitializer.getProxy ClassCastException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 4.2.7.SP1, 4.3.0.CR2
    • Fix versions: 4.2.8, 4.3.0.CR2
    • Components: hibernate-core
    • Labels:
    • Environment:
      any
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Suitable for new contributors:
      Yes, likely
    • Last commented by a user?:
      true
    • Sprint:

      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).

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: