hibernate/hibernate-orm — pull request #555 by lgathy (2013-07-10 12:50:21+00:00)
Title: HHH-3078 Fixed bug with multiple classloaders and proxy class

This is an old issue. For me it occured when deploying to JBossAS 7.x, because the module-based classloader separates my app from e.g. org.hibernate module. When using proxyClass for an entity instrumentation can only be done if the classloader of my interface (in my app) is used to create the proxy class.
I also attached a test case where my nested entity class has default visibility. This works exactly as the module-based classloader: HibernateProxy's classloader cannot see my interface, but the classloader of my interface can see both itself and HibernateProxy.
This fix is done on master, but now it can be merged to 4.2 without conflict.