Websphere JPA Persistence is incompatible with default PersistenceProvider -
i getting following error
[9/29/15 21:06:33:816 ist] 0000003f jpapunitinfo e cwwjp0015e: error occurred in org.hibernate.ejb.hibernatepersistence persistence provider when attempted create container entity manager factory rga-hibernate-jpa persistence unit. following error occurred: java.lang.classcastexception: org.hibernate.ejb.hibernatepersistence incompatible javax.persistence.spi.persistenceprovider.
this problem has been experienced lot of people. 1.this,2.this,3.and this
i went through answers provided in above links , other forums. common suggestion remove jpa 2.0 jar (which can't do) , make class loader parent last.
is there solution other this? defining properties in persistence.xml.
my websphere version 8.5.5.2.
in persistence.xml <provider>org.hibernate.ejb.hibernatepersistence</provider>
===================update=======================
as described in other postings referenced, basic issue have more 1 copy of javax.persistence api in system. likely, have 1 in application (along hibernate impl) , 1 provided websphere application server. since modifying websphere going next impossible, suggest exploring removal of hibernate jpa api jar file.
now there aspect of issue need aware of... don't mention version of hibernate nor version of jpa attempting use. but, websphere v8.5.5.2 limited jpa 2.0. if trying use version of hibernate (or eclipselink or openjpa) jpa 2.1 compliant, it's not going work. encounter classloading issues immediately. and, there no workaround this. @ least not container-managed persistence. might able work application-managed persistence jpa 2.1 provider, you'll limited on functionality available you.
Comments
Post a Comment