4 Replies Latest reply on Aug 20, 2009 5:11 PM by rams.rapol

    JBPM4 Spring-Hibernate Integration

    faisalgeek

      Hello,

      I am using JBPM4 in my application that is already using integrated Spring+Hibernate, web based.


      I have read the following guides about jbpm4 to integrate into spring, but not successful.


      1. http://www.inze.be/andries/2009/05/16/demo-on-spring-integration-with-jbpm4/

      2. http://www.nljug.org/pages/events/content/jspring_2009/sessions/00034/

      Looking for expert advice and thanks in advance.

        • 1. Re: JBPM4 Spring-Hibernate Integration
          bestage

          Well, you should specify some more details if you expect to get help here.

          I tried out jBPM4 with Spring using Adre Inze's tutorial too and had no problems at all.

          So the problem may be in your project setup. Maybe some dependencies are missing.

          • 2. Re: JBPM4 Spring-Hibernate Integration
            faisalgeek

            I done the config that told in Adre Inze's tutorial, but getting the following exception.....

            org.jbpm.api.JbpmException: No platformTransaction manager defined.
            at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:60)
            at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
            at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
            at org.jbpm.pvm.internal.svc.TaskServiceImpl.newTask(TaskServiceImpl.java:63)
            at com.netsol.manager.wf.BPMService.dumyTask(BPMService.java:31)
            at com.netsol.unittest.bpm.BPMTest.testBPMService(BPMTest.java:15)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at junit.framework.TestCase.runTest(TestCase.java:168)
            at junit.framework.TestCase.runBare(TestCase.java:134)
            at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
            at junit.framework.TestResult$1.protect(TestResult.java:110)
            at junit.framework.TestResult.runProtected(TestResult.java:128)
            at junit.framework.TestResult.run(TestResult.java:113)
            at junit.framework.TestCase.run(TestCase.java:124)
            at junit.framework.TestSuite.runTest(TestSuite.java:232)
            at junit.framework.TestSuite.run(TestSuite.java:227)
            at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
            at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
            at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

            • 3. Re: JBPM4 Spring-Hibernate Integration
              faisalgeek

              org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jbpmSessionFactory' defined in class path resource [com/netsol/unittest/config/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: proxy class not found: org.jbpm.jpdl.internal.model.JpdlExecution
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:407)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
              at org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext(AbstractSingleSpringContextTests.java:213)
              at org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:189)
              at org.springframework.test.AbstractSingleSpringContextTests.loadContext(AbstractSingleSpringContextTests.java:169)
              at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:140)
              at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:98)
              at junit.framework.TestCase.runBare(TestCase.java:132)
              at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
              at junit.framework.TestResult$1.protect(TestResult.java:110)
              at junit.framework.TestResult.runProtected(TestResult.java:128)
              at junit.framework.TestResult.run(TestResult.java:113)
              at junit.framework.TestCase.run(TestCase.java:124)
              at junit.framework.TestSuite.runTest(TestSuite.java:232)
              at junit.framework.TestSuite.run(TestSuite.java:227)
              at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
              at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
              at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
              Caused by: org.hibernate.MappingException: proxy class not found: org.jbpm.jpdl.internal.model.JpdlExecution
              at org.hibernate.mapping.PersistentClass.getProxyInterface(PersistentClass.java:109)
              at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:117)
              at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
              at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
              at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
              at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:302)
              at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
              at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:109)
              at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
              at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
              at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:753)
              at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:691)
              at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
              ... 31 more
              Caused by: java.lang.ClassNotFoundException: org.jbpm.jpdl.internal.model.JpdlExecution
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:169)
              at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
              at org.hibernate.mapping.PersistentClass.getProxyInterface(PersistentClass.java:106)
              ... 46 more

              • 4. Re: JBPM4 Spring-Hibernate Integration

                i think you have to remove reference to jbpm.jpdl.hbm.xml..there were previous posts on the same.