[hibernate-users] Cannot cast org.hibernate.classic.Session to org.hibernate.impl.SessionImpl

Robert Klemme shortcutter at googlemail.com
Thu Jun 19 04:20:12 EDT 2008


2008/6/18 Halil Ağın <halil.agin at gmail.com>:

> I looked that SessionImpl class implements org.hibernate.classic.Session
> interface, therefore the casting should work.
> But when i run the application, there occure cast exception which says that
> Cannot cast org.hibernate.classic.Session to org.hibernate.impl.SessionImpl.
>
>
> Why this casting not working I could not understand. I think It should work,
> because i am making a casting operation from an interface to its
> implementation class.
>
> Does anybody know why it does not work?

Did you check permissions?  Maybe the implementing class is package
visible only.

Cheers

robert




More information about the hibernate-users mailing list