I am getting the following error
[9/29/15 21:06:33:816 IST] 0000003f JPAPUnitInfo E CWWJP0015E: An error occurred in the
org.hibernate.ejb.HibernatePersistence persistence provider when it attempted to create the
container entity manager factory for the rga-hibernate-jpa persistence unit.
The following error occurred:
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence
incompatible with javax.persistence.spi.PersistenceProvider.
This problem has been experienced by lot of people. 1.this,2.this,3.and this
I went through the answers provided in the above links and some other forums. The common suggestion is to remove the JPA 2.0 jar (which I can't do) and to make the class loader as parent last.
Is there any solution other than this? Like defining some properties in my persistence.xml.
My websphere version is 8.5.5.2.
In my persistence.xml
<provider>org.hibernate.ejb.HibernatePersistence</provider>
===================UPDATE=======================