5 Replies Latest reply on Jun 16, 2009 11:11 AM by Ronald van Kuijk

    Help needed : missing scheduler while testing a timer

    Fabien Coppens Newbie

      Hi.
      I'm testing a simple process with one node and a timer at that node, and I get the following error :

      16:34:23,466 INFO [STDOUT] 16:34:23,466 ERROR [GraphElement] action threw exception: service 'scheduler' unavailable
      org.jbpm.svc.JbpmServiceException: service 'scheduler' unavailable
       at org.jbpm.svc.Services.getCurrentService(Services.java:91)
       at org.jbpm.svc.Services.getCurrentService(Services.java:81)
       at org.jbpm.scheduler.def.CreateTimerAction.execute(CreateTimerAction.java:66)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
       at org.jbpm.graph.def.Node.enter(Node.java:302)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.graph.node.StartState.leave(StartState.java:70)
       at org.jbpm.graph.exe.Token.signal(Token.java:194)
       at org.jbpm.graph.exe.Token.signal(Token.java:139)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:270)
       at com.bt.intfwk.testjbpm.ServletTestJbpm.doGet(ServletTestJbpm.java:65)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      


      My test setup is a simple servlet whose doGet method send a signal to the process :

      ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
       "<process-definition >"+
       "<start-state name=\"start'\">"+
       "<transition name=\"\" to=\"TimerNode\"></transition>"+
       "</start-state>"+
       "<node name=\"TimerNode\"> "+
       "<timer name=\"testTimer\" "+
       "duedate=\"1 business minute\" >"+
       "</timer>"+
       "<transition name=\"\" to=\"end1\"></transition>"+
       "</node>"+
       "<end-state name=\"end1\"></end-state>"+
       "</process-definition>"
       );
       ProcessInstance instance = new ProcessInstance(processDefinition);
      
       instance.signal();
      


        • 1. Re: Help needed : missing scheduler while testing a timer
          Fabien Coppens Newbie

          OK, problem solved, the DBSchedulerServiceFactory definition was missing in the jbpm.cfg.xml file.
          I now get another problem :

          2007-09-20 18:05:48,493 INFO [STDOUT] 18:05:48,493 ERROR [JobSession] org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.graph.def.Node
          2007-09-20 18:05:48,495 INFO [STDOUT] 18:05:48,493 ERROR [GraphElement] action threw exception: couldn't cancel timers 'Timer' for 'Token(/)'
          org.jbpm.JbpmException: couldn't cancel timers 'Timer' for 'Token(/)'
           at org.jbpm.db.JobSession.cancelTimersByName(JobSession.java:178)
           at org.jbpm.scheduler.db.DbSchedulerService.deleteTimersByName(DbSchedulerService.java:47)
           at org.jbpm.scheduler.def.CancelTimerAction.execute(CancelTimerAction.java:46)
           at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
           at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
           at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
           at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
           at org.jbpm.graph.def.Node.leave(Node.java:381)
           at org.jbpm.graph.def.Node.leave(Node.java:357)
           at org.jbpm.graph.def.Node.execute(Node.java:349)
           at org.jbpm.graph.def.Node.enter(Node.java:318)
           at org.jbpm.graph.def.Transition.take(Transition.java:151)
           at org.jbpm.graph.def.Node.leave(Node.java:393)
           at org.jbpm.graph.node.StartState.leave(StartState.java:70)
           at org.jbpm.graph.exe.Token.signal(Token.java:194)
           at org.jbpm.graph.exe.Token.signal(Token.java:139)
           at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:270)
           at com.bt.intfwk.testjbpm.ServletTestJbpm.doGet(ServletTestJbpm.java:67)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.graph.def.Node
           at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219)
           at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)
           at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)
           at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:597)
           at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3123)
           at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:472)
           at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:197)
           at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120)
           at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
           at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
           at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
           at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
           at org.jbpm.db.JobSession.cancelTimersByName(JobSession.java:166)
           ... 38 more
          


          • 3. Re: Help needed : missing scheduler while testing a timer
            Fabien Coppens Newbie

            OK, I created the new topic.
            I hope that I will get more useful answers than this one.

            "kukeltje" wrote:
            Fabian,

            New problems belong in new topics



            • 4. Re: Help needed : missing scheduler while testing a timer
              Prachi Mukhija Newbie

              Hi,

              I'm facing the same issue. I have specified the scheduler service

               <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
              

              in my jbpm.cfg.xml file. (in the jbpm-context element)
              However, it still shows that the scheduler is missing.
              Pls help.

              Thanks in advance.

              • 5. Re: Help needed : missing scheduler while testing a timer
                Ronald van Kuijk Master

                are you sure this config file is used and not another one?