java.lang.ClassCastException: org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider

mzan.com | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    EntityManager not injected using @PersistenceContext in JBoss 4.3 (EJB3 and Hibernate 4.3.9 Final)

    Stack Overflow | 2 years ago
    java.lang.ClassCastException: org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
  2. 0

    EntityManager not injected using @PersistenceContext in JBoss 4.3 (EJB3 and Hibernate 4.3.9 Final) - codes fans

    mzan.com | 6 months ago
    java.lang.ClassCastException: org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
  3. 0

    Problem in deployment of ejb 3 in JBoss Server using Oracle Toplink as JPA

    Oracle Community | 10 years ago | 843830
    java.lang.ClassCastException: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub - lauriharpf/jboss-4-3-jpa-ejb: Test project for using JBoss 4.3.0 together with JPA 2.0 (Hibernate 4.3.9.Final)

    github.com | 6 months ago
    java.lang.ClassCastException: org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.hibernate.jpa.HibernatePersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider

      at org.jboss.ejb3.entity.PersistenceUnitDeployment.start()
    2. org.jboss.ejb3
      PersistenceUnitDeployment.start
      1. org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:245)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    4. org.jboss.ejb3
      ServiceDelegateWrapper.startService
      1. org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
      1 frame
    5. JBoss Application Server System
      ServiceMBeanSupport.jbossInternalLifecycle
      1. org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2. org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    7. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    8. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    9. JBoss Application Server System
      ServiceController$ServiceProxy.invoke
      1. org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      1 frame
    10. com.sun.proxy
      $Proxy0.start
      1. com.sun.proxy.$Proxy0.start(Unknown Source)
      1 frame
    11. JBoss Application Server System
      ServiceController.start
      1. org.jboss.system.ServiceController.start(ServiceController.java:417)
      1 frame
    12. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    13. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    14. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      5. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      5 frames
    15. com.sun.proxy
      $Proxy55.start
      1. com.sun.proxy.$Proxy55.start(Unknown Source)
      1 frame
    16. org.jboss.ejb3
      Ejb3Module.startService
      1. org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
      2. org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:628)
      3. org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:352)
      4. org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:83)
      4 frames
    17. JBoss Application Server System
      ServiceMBeanSupport.jbossInternalLifecycle
      1. org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2. org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2 frames
    18. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    19. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    20. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    21. JBoss Application Server System
      ServiceController$ServiceProxy.invoke
      1. org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      1 frame
    22. com.sun.proxy
      $Proxy0.start
      1. com.sun.proxy.$Proxy0.start(Unknown Source)
      1 frame
    23. JBoss Application Server System
      ServiceController.start
      1. org.jboss.system.ServiceController.start(ServiceController.java:417)
      1 frame
    24. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    25. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    26. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      5. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      5 frames
    27. com.sun.proxy
      $Proxy33.start
      1. com.sun.proxy.$Proxy33.start(Unknown Source)
      1 frame
    28. org.jboss.ejb3
      EJB3Deployer.start
      1. org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:525)
      1 frame
    29. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    30. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    31. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    32. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    33. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    34. org.jboss.mx
      DynamicInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      2. org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      2 frames
    35. JBoss Application Server System
      InterceptorServiceMBeanSupport.invokeNext
      1. org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      1 frame
    36. JBoss Web Services - Container JBoss-4.2.3
      DeployerInterceptor.start
      1. org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
      1 frame
    37. JBoss Application Server System JMX
      SubDeployerInterceptor.invoke
      1. org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      2. org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      2 frames
    38. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      4 frames
    39. com.sun.proxy
      $Proxy34.start
      1. com.sun.proxy.$Proxy34.start(Unknown Source)
      1 frame
    40. JBoss Application Server System JMX
      MainDeployer.deploy
      1. org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      2. org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
      3. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      4. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      4 frames
    41. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    42. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    43. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    44. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    45. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    46. org.jboss.mx
      ModelMBeanOperationInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      1 frame
    47. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      4 frames
    48. com.sun.proxy
      $Proxy9.deploy
      1. com.sun.proxy.$Proxy9.deploy(Unknown Source)
      1 frame
    49. org.jboss.deployment
      AbstractDeploymentScanner.startService
      1. org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      2. org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      3. org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      4. org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
      4 frames
    50. JBoss Application Server System
      ServiceMBeanSupport.jbossInternalLifecycle
      1. org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2. org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2 frames
    51. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    52. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    53. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    54. JBoss Application Server System
      ServiceController$ServiceProxy.invoke
      1. org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      1 frame
    55. com.sun.proxy
      $Proxy0.start
      1. com.sun.proxy.$Proxy0.start(Unknown Source)
      1 frame
    56. JBoss Application Server System
      ServiceController.start
      1. org.jboss.system.ServiceController.start(ServiceController.java:417)
      1 frame
    57. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    58. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    59. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      5. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      5 frames
    60. com.sun.proxy
      $Proxy4.start
      1. com.sun.proxy.$Proxy4.start(Unknown Source)
      1 frame
    61. JBoss Application Server System JMX
      MainDeployer.deploy
      1. org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      2. org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      3. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      4. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      5. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
      5 frames
    62. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    63. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    64. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    65. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    66. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    67. org.jboss.mx
      ModelMBeanOperationInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      1 frame
    68. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      4 frames
    69. com.sun.proxy
      $Proxy5.deploy
      1. com.sun.proxy.$Proxy5.deploy(Unknown Source)
      1 frame
    70. JBoss Application Server System JMX
      ServerImpl.start
      1. org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
      2. org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
      2 frames
    71. JBoss Application Server Server
      Main$1.run
      1. org.jboss.Main.boot(Main.java:200)
      2. org.jboss.Main$1.run(Main.java:513)
      2 frames
    72. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame