[jboss-user] [JBoss Portal] - ClassCastException when casting Hibernate bean.

IvanLatysh do-not-reply at jboss.com
Fri Jul 28 23:38:01 EDT 2006


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 !

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961668#3961668

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961668



More information about the jboss-user mailing list