1 Reply Latest reply on Jul 26, 2016 4:53 PM by SANJAY GAUTAM

    JBPM6.1 + Quartz

    Miguel Angel Garcia Newbie

      Hi,

      I'm newer with JBPM. I'm using JBPM like a embedded library in my project and I deploy it in WebLogic 12c.

      I'm modeling a process that is shown in next image :

      Captura de pantalla de 2015-08-13 12:17:22.png

      I need persist the timers because if the server goes down when the server restart, the process must continue. I guess I have to configure quartz and I have next configuration:

      1. In MyApplicationScopedProducer I've set the quartz property : System.setProperty("org.quartz.properties", "org/quartz/quartz.properties");
      2. I put in org/quartz,quartz.properties the next configuration:

      #============================================================================

      # Configure Main Scheduler Properties 

      #============================================================================

      org.quartz.scheduler.instanceName = MyClusteredScheduler

      org.quartz.scheduler.instanceId = AUTO

      #============================================================================

      # Configure ThreadPool 

      #============================================================================

      org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool

      org.quartz.threadPool.threadCount = 25

      org.quartz.threadPool.threadPriority = 5

      #============================================================================

      # Configure JobStore 

      #============================================================================

      org.quartz.jobStore.misfireThreshold = 60000

      org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX

      org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate

      org.quartz.jobStore.useProperties = false

      org.quartz.jobStore.dataSource = managedDS

      org.quartz.jobStore.tablePrefix = QRTZ_

      org.quartz.jobStore.isClustered = false

      org.quartz.jobStore.clusterCheckinInterval = 20000

      #============================================================================

      # Configure Datasources 

      #============================================================================

      org.quartz.dataSource.managedDS.jndiURL=jdbc/jbpm-ds

      org.quartz.dataSource.managedDS.java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory

       

       

      The Timer's type is Duration (20s) and It's used like a deadline if the Intermediate Event never occurs. This is attempted 3 times before exit.

       

      • JBPM and Quartz can share the same data base schema?
      • I check the QUARTZ tables and there aren't rows in them. Do I need configure anything else ?
      • When I execute the process, the next error is produced and I dont't why:

      Caused by: javax.enterprise.inject.CreationException

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

        at java.lang.Class.newInstance(Class.java:379)

        at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:344)

        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173)

        at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:341)

        at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33)

        at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:45)

        at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:85)

        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:143)

        at org.jboss.weld.bean.ProducerMethod$ProducerMethodProducer.produce(ProducerMethod.java:136)

        at org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:319)

        at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307)

        at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674)

        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:136)

        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:763)

        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:772)

        at org.jboss.weld.bean.SessionBean$SessionBeanInjectionTarget$1.proceed(SessionBean.java:179)

        at com.oracle.injection.provider.weld.WeldInjectionServicesAdapter.aroundInject(WeldInjectionServicesAdapter.java:103)

        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)

        at org.jboss.weld.bean.SessionBean$SessionBeanInjectionTarget.inject(SessionBean.java:176)

        at com.oracle.injection.provider.weld.WeldEjbBeanManager$ExtendedInjectionTarget.inject(WeldEjbBeanManager.java:119)

        at com.oracle.injection.provider.weld.WeldEjbBeanManager.newBeanInstance(WeldEjbBeanManager.java:82)

        at com.oracle.injection.provider.weld.WeldWebWithEjbBeanManager.newBeanInstance(WeldWebWithEjbBeanManager.java:24)

        at weblogic.ejb.container.injection.InjectionBasedEjbComponentCreator.getBean(InjectionBasedEjbComponentCreator.java:75)

        at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:218)

        at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:244)

        at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:306)

        at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:179)

        at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:108)

        at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:187)

        at weblogic.ejb.container.internal.BaseLocalObject.getBeanInstance(BaseLocalObject.java:149)

        ... 89 more

      Caused by: java.lang.ClassCircularityError: org/quartz/SchedulerException

        at org.jbpm.process.core.timer.impl.QuartzSchedulerService.initScheduler(QuartzSchedulerService.java:203)

        at org.jbpm.process.core.timer.impl.GlobalTimerService.<init>(GlobalTimerService.java:61)

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.initTimerService(RuntimeManagerFactoryImpl.java:142)

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl.java:103)

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl.java:95)

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl$Proxy$_$$_WeldClientProxy.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl$Proxy$_$$_WeldClientProxy.java)

        at org.jbpm.runtime.manager.impl.cdi.RuntimeManagerProducer.newPerProcessInstanceRuntimeManager(RuntimeManagerProducer.java:84)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)

        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)

        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)

        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137)

        ... 113 more

       

       

      I need help, thank you.

        • 1. Re: JBPM6.1 + Quartz
          SANJAY GAUTAM Expert

          Hi ,

           

          quartz properties are don't seems to be ok , in my configuration which works version 6.2.0.Final version

           

          org.quartz.dataSource.managedDS.jndiURL=jboss/datasources/jbpmDS

          org.quartz.dataSource.notManagedDS.jndiURL=jboss/datasources/quartzNotManagedjbpmDS

          There are two database urls which I configure , managed and non managed one as you can see there are two JNDI for each .

           

          Hope that it helps

           

          thanks

          Sanjay Gautam