Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by mitul bhatnagar
, 1 year ago
org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider. These are the following things I have already completed. Create a new version of Hibernate Library Upgrade my JodaTime library Add the JPA
weblogic.deployment.EnvironmentException: Error processing persistence unit BagTagAgentEJB of module BagTagAgentEJB-1.0.0-SNAPSHOT.jar: Error instantiating the Persistence Provider class org.hibernate.jpa.HibernatePersistenceProvider of the PersistenceUnit BagTagAgentEJB: java.lang.ClassCastException: org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider	at weblogic.deployment.BasePersistenceUnitInfoImpl.getPersistenceProvider(BasePersistenceUnitInfoImpl.java:375)	at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)	at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)	at weblogic.deployment.BasePersistenceUnitInfoImpl.(BasePersistenceUnitInfoImpl.java:158)	at weblogic.deployment.PersistenceUnitInfoImpl.(PersistenceUnitInfoImpl.java:46)	at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349)	at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:263)	at weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:69)	at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:223)	at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:324)	at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)	at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:393)