0 Replies Latest reply on Jul 28, 2006 11:37 PM by Ivan Latysh

    ClassCastException when casting Hibernate bean.

    Ivan Latysh Newbie

      Hi All!

      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 !