java.lang.ClassCastException: 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 & Persistance upgrade for server to accept JPA 2.0 (Although we will be using our own libraries). set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-1.jar;%PRE_CLASSPATH% Changed the persistance.xml Persistance.xml <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns /persistence/persistence_1_0.xsd"> <persistence-unit name="BagTagAgentEJB" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <jta-data-source>jdbc/GuestSelfService</jta-data-source> <class>hibernate.DataAccessObject.bla</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" > /> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup" /> </properties> </persistence-unit> </persistence> weblogic-application.xml <wls:prefer-application-packages> <wls:package-name>antlr.*</wls:package-name> <wls:package-name>javassist.*</wls:package-name> <wls:package-name>org.dom4j.*</wls:package-name> <wls:package-name>org.apache.commons.collections.*</wls:package-name> <wls:package-name>org.apache.log4j.*</wls:package-name> <wls:package-name>org.hibernate.*</wls:package-name> <wls:package-name>javax.persistence.*</wls:package-name> <wls:package-name>org.joda.*</wls:package-name> <wls:package-name>org.slf4j.*</wls:package-name> </wls:prefer-application-packages> I'm getting the following error at the time of deployment <12/01/2015 2:49:01 PM EST> at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)

  1. 0

    Use Hibernate 4.3.7.Final and JPA 2.1 on Weblogic 10.3.6

    Stack Overflow | 2 years ago | mitul bhatnagar
    java.lang.ClassCastException: 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 & Persistance upgrade for server to accept JPA 2.0 (Although we will be using our own libraries). set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-1.jar;%PRE_CLASSPATH% Changed the persistance.xml Persistance.xml <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns /persistence/persistence_1_0.xsd"> <persistence-unit name="BagTagAgentEJB" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <jta-data-source>jdbc/GuestSelfService</jta-data-source> <class>hibernate.DataAccessObject.bla</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" > /> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup" /> </properties> </persistence-unit> </persistence> weblogic-application.xml <wls:prefer-application-packages> <wls:package-name>antlr.*</wls:package-name> <wls:package-name>javassist.*</wls:package-name> <wls:package-name>org.dom4j.*</wls:package-name> <wls:package-name>org.apache.commons.collections.*</wls:package-name> <wls:package-name>org.apache.log4j.*</wls:package-name> <wls:package-name>org.hibernate.*</wls:package-name> <wls:package-name>javax.persistence.*</wls:package-name> <wls:package-name>org.joda.*</wls:package-name> <wls:package-name>org.slf4j.*</wls:package-name> </wls:prefer-application-packages> I'm getting the following error at the time of deployment <12/01/2015 2:49:01 PM EST> at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)
  2. 0

    ClassCastException: org.apache.openjpa.persistence.PersistenceProviderImpl

    Oracle Community | 6 years ago | 827388
    weblogic.application.ModuleException: Exception preparing module: EJBModule(ReportBrokerService.jar)
  3. 0

    Hibernate Community • View topic - problem with weblogic 11r1 with hibernate and mysql

    hibernate.org | 8 months ago
    java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error while deploying the Eclipse Link Application into Server

    Oracle Community | 8 years ago | 702532
    weblogic.deployment.EnvironmentException: Error processing persitence unit EJBModel of module WLEclipseLinkDemo-ejb.jar: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit EJBModel: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
  6. 0

    Using EJB with Hibernate on Weblogic Server ADF platform

    Oracle Community | 4 years ago | webyildirim
    weblogic.application.ModuleException: Exception preparing module: EJBModule(ejb1.jar)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. weblogic.deployment
      ModulePersistenceUnitRegistry.<init>
      1. weblogic.deployment.BasePersistenceUnitInfoImpl.getPersistenceProvider(BasePersistenceUnitInfoImpl.java:375)
      2. weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
      3. weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
      4. weblogic.deployment.BasePersistenceUnitInfoImpl.<init>(BasePersistenceUnitInfoImpl.java:158)
      5. weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:46)
      6. weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349)
      7. weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:263)
      8. weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:69)
      8 frames
    3. weblogic.ejb.container
      EJBModule$1.execute
      1. weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:223)
      2. weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:324)
      2 frames
    4. weblogic.deployment
      PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries
      1. weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)
      1 frame
    5. weblogic.ejb.container
      EJBModule.prepare
      1. weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:393)
      1 frame