12 Replies Latest reply on Jun 13, 2006 7:39 AM by ashiiid

    problem with timer

    ashiiid

      hi,

      i have this code :








      it works in the webapp, but not when i run it with java code, i got this exception :

      11:30:42,981 [main] ERROR GraphElement : action threw exception: service 'scheduler' unavailable
      org.jbpm.svc.JbpmServiceException: service 'scheduler' unavailable
      at org.jbpm.svc.Services.getCurrentService(Services.java:86)
      at org.jbpm.svc.Services.getCurrentService(Services.java:76)
      ...

      can anyone help me plz

      regards

        • 1. Re: problem with timer
          ashiiid


          sorry

          the code was :





          • 2. Re: problem with timer
            ashiiid

            sorry again

            i copied the code of my process but i dosen't appear i don't knoow why, can anyone help me???

            • 3. Re: problem with timer
              hosierdm

              Try using the code tags you see at the top of the Reply window, just under the Subject text box. Use a code tag to start, paste your code, then use a code tag to end.

              • 4. Re: problem with timer
                ashiiid

                ok here is my code :


                <state name="thinking">
                 <timer duedate="15 seconds" transition="ok1">
                 <action></action>
                 </timer>
                 <transition name="ok1" to="decision of the director"></transition>
                 </state>


                it works well in the webapp but when i run it i got this exception :

                14:12:53,247 [main] DEBUG GraphElement : event 'node-enter' on 'State(thinking)' for 'Token(/)'
                14:12:53,247 [main] DEBUG GraphElement : executing action 'CreateTimerAction(21b220)'
                14:12:53,247 [main] DEBUG GraphElement : event 'timer-create' on 'State(thinking)' for 'Token(/)'
                14:12:53,247 [main] ERROR GraphElement : action threw exception: service 'scheduler' unavailable
                org.jbpm.svc.JbpmServiceException: service 'scheduler' unavailable
                at org.jbpm.svc.Services.getCurrentService(Services.java:86)
                at org.jbpm.svc.Services.getCurrentService(Services.java:76)
                ...

                can anyone help me plz

                • 5. Re: problem with timer
                  ashiiid

                  hello

                  exception :

                  17:46:49,974 [main] ERROR GraphElement : action threw exception: service 'scheduler' unavailable
                  org.jbpm.svc.JbpmServiceException: service 'scheduler' unavailable

                  any help plz??

                  • 6. Re: problem with timer
                    saviola

                    Hi!
                    Excuse me, kukeltje but I couldn't stand waiting to your answer :(
                    http://www.catb.org/~esr/faqs/smart-questions.html

                    • 7. Re: problem with timer
                      ashiiid



                      hi,

                      I tried thes solution of "afgomez", and the exception : 'service scheduler unavailable' disappeared, but I had a new exception when it enters to this node :

                      <state name="thinking">
                       <timer duedate="15 seconds" transition="ok1">
                       <action> </action>
                       </timer>
                       <transition name="ok1" to="decision of the director"></transition>
                       </state>


                      the exception is :

                      15:50:12,028 [main] DEBUG GraphElement : event 'timer-create' on 'State(thinking)' for 'Token(/)'
                      15:50:12,028 [main] DEBUG DbPersistenceServiceFactory : creating persistence service
                      15:50:12,044 [main] ERROR GraphElement : action threw exception: org/hibernate/Session
                      java.lang.NoClassDefFoundError: org/hibernate/Session


                      I'm new in jbpm and also english

                      Can you help me please

                      regards

                      • 8. Re: problem with timer
                        ashiiid

                        hi,

                        I added hibernate.jar to my project, and the old ecxeption deseapeared, but I have a new exception :(

                        11:11:15,731 [main] WARN JDBCExceptionReporter : SQL Error: -22, SQLState: S0002
                        11:11:15,731 [main] ERROR JDBCExceptionReporter : Table not found in statement [insert into JBPM_TIMER (NAME_, DUEDATE_, REPEAT_, TRANSITIONNAME_, EXCEPTION_, ISSUSPENDED_, ACTION_, TOKEN_, PROCESSINSTANCE_, TASKINSTANCE_, GRAPHELEMENTTYPE_, GRAPHELEMENT_, ID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, null)]
                        11:11:15,731 [main] ERROR SchedulerSession : org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.scheduler.exe.Timer]
                        11:11:15,746 [main] ERROR GraphElement : action threw exception: couldn't save timer 'timer(thinking,11:11:22,996)' to the database
                        org.jbpm.JbpmException: couldn't save timer 'timer(thinking,11:11:22,996)' to the database

                        i'am trying to solve this problem but i can't

                        can u help me plz??

                        regards

                        • 9. Re: problem with timer
                          kukeltje

                          Sure I can. As can you. Read the second line.

                          • 10. Re: problem with timer
                            ashiiid

                            hi,

                            the table JBPM_TIMER exists, but i don't know what to do to resolve this exception :(

                            any help plz,
                            regards

                            • 11. Re: problem with timer
                              kukeltje

                              Exists where? In my DB is does, in the DB my jbpm instance uses it does. It does *not* exist in the DB your jbpm instance is using. Look at the hibernate config files to see what db it points to

                              • 12. Re: problem with timer
                                ashiiid


                                It points in HSLDB :

                                <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                                 <property name="hibernate.connection.url">jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</property>


                                do I have to connect in the DB on my code java?? I don't know what to do

                                Plz help me
                                regards