I have a problem with casting retrieved hibernate bean from my portlet.
I have simple setup: * Hibernate archieve deployed as HAR. * In my webapp I have har.jar with pojo classes.
I successfully look up HibernateSessionFactory and query my bean from my portlet. But when I am trying to cast it to it's own class I am getting ClassCastException. Both classes are the same, but it looks like they have been loaded with 2 different classloaders.
I can't find a solution for this issue, so any help apprechiated !