2 Replies Latest reply on Sep 17, 2013 6:20 AM by Rajesh P

    java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvide exception while running jBPM 5.4 on Tomcat 7

    Rajesh P Newbie

      Hi,

      I am trying to install jBPM 5.4 on Tomcat 7 by following the guide mentioned in https://community.jboss.org/people/bpmn2user/blog/2011/01/21/test link.

       

      I am able to see the login page. I have given the login credentials as krisv/krisv

       

      I am getting below exception when click on the login button.

       

      SEVERE: StandardWrapper.Throwable

      java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider

                at javax.persistence.Persistence.findAllProviders(Persistence.java:80)

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:49)

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

                at org.jbpm.task.servlet.HumanTaskServiceServlet.init(HumanTaskServiceServlet.java:83)

                at javax.servlet.GenericServlet.init(GenericServlet.java:160)

                at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)

                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)

                at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)

                at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)

                at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)

                at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:619)

      Apr 30, 2013 12:12:33 PM org.apache.catalina.core.StandardContext loadOnStartup

      SEVERE: Servlet /jbpm-human-task threw load() exception

      java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider

                at javax.persistence.Persistence.findAllProviders(Persistence.java:80)

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:49)

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

                at org.jbpm.task.servlet.HumanTaskServiceServlet.init(HumanTaskServiceServlet.java:83)

                at javax.servlet.GenericServlet.init(GenericServlet.java:160)

                at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)

                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)

                at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)

                at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)

                at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)

                at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:619)

      Apr 30, 2013 12:12:47 PM org.apache.catalina.core.ApplicationContext log

      INFO: Marking servlet Resteasy as unavailable

      Apr 30, 2013 12:12:47 PM org.apache.catalina.core.StandardWrapperValve invoke

      SEVERE: Allocate exception for servlet Resteasy

      java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

                at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)

                at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)

                at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527)

                at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509)

                at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137)

                at org.jboss.weld.environment.tomcat7.ForwardingInstanceManager.newInstance(ForwardingInstanceManager.java:26)

                at org.jboss.weld.environment.tomcat7.WeldForwardingInstanceManager.newInstance(WeldForwardingInstanceManager.java:62)

                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)

                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

                at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:619)

       

       

      Please help on this.

       

      Thanks,

      Rajesh