What you see is a Hibernate-Proxy-Object, which allows sleepers to perform lazy instantiation.
First of all, ask yourself if you really want to access the source object. Usually, you'd better pretend that the proxy is your actual object, and let hibernate do all the magic.
If for some reason you really need the object itself (for example, if you need the exact type), the following code should work:
if (object instanceof HibernateProxy) { return ((HibernateProxy) object).getHibernateLazyInitializer().getImplementation(); }
You should know that the result of the above code will give you a separate object that is no longer under hibernate control, so changes to the object will not be synchronized with the database!
source share