JBoss Community

Re: org.hibernate.internal.SessionImpl cannot be cast to org.hibernate.classic.Session

created by yunshi tan in JBoss AS 7 Development - View the full discussion

I had this problem before.

 

The cause is :

In fact I use Hibernate 3 instead of Hibernate 4 and I forget to add

<property name="jboss.as.jpa.providerModule" value="org.hibernate:3" />

into my persistence.xml.

 

So after adding this property everything goes well.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community