On Jun 30, 2012, at 11:34 AM, Enrico Olivelli wrote: > Grave: Unable to deploy collapsed ear in war /HibernateTomee: Exception: > Creating application failed: C:\work\HibernateTomee\build\web: > java.util.concurrent.ExecutionException: java.lang.ClassCastException: > org.hibernate.ejb.HibernatePersistence cannot be cast to > javax.persistence.spi.PersistenceProvider: java.lang.ClassCastException: > org.hibernate.ejb.HibernatePersistence cannot be cast to > javax.persistence.spi.PersistenceProvider
Looks like you have a duplicate copy of the JPA API jar in your webapp and it is conflicting with the one already in TomEE. Remove that and that should fix it. -David
