8 Replies Latest reply on Feb 12, 2010 4:09 AM by swiderski.maciej

    Async fork error with jBPM 4.3

    swiderski.maciej

      Hi,

       

      I have created basic flow that uses async fork (based on the example from jBPM package) and it runs properly as a test case but causes errors when running on JBoss AS. Attached all files (jPDL, java classes and ftl).

      The issue is that sometimes it does work but sometime it throws following exception:

      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.model.ExecutionImpl#10065]
      

       

      but the execution goes down to the next node - in this case to task node. Entire log for one execution of this process is attached as log file.

       

      I tried on two data bases: HSQLDB and PostgreSQL.

       

      I tried both async and exclusive for the fork node but no difference at all.

       

      Is there anything I am doing wrong?!

       

      Thanks

      Maciej

        • 1. Re: Async fork error with jBPM 4.3
          kukeltje
          Is it possible to provide one zip file with everything in it? Preferably in a format that can be imported in eclipse as a project or that fits in the jBPM test-db module or as a maven project?
          • 2. Re: Async fork error with jBPM 4.3
            swiderski.maciej

            Hi,

             

            sure, here it comes as eclipse project. Currently it is configured to use HSQLDB.

             

            Thanks for investigation

            Maciej

            • 3. Re: Async fork error with jBPM 4.3
              kukeltje
              Your test is green here with the latest trunk (pre-4.4). So can you try with that if it works for you to. I cannot directly relate the problem you have to closed jira issues, but it might be solved by other checkins.
              • 4. Re: Async fork error with jBPM 4.3
                swiderski.maciej

                yes, you are right. It does work with 4.4-SNAPSHOT.

                 

                Weird thing is that it started to work as unit test on 4.3 as well, but still does not work on JBoss, throwing same exceptions as described above.

                 

                It seems like some concurency problem. Isn't that true that by setting exclusive all jobs should be executed in sequence for that particular process instance? That would explain why unit test works but not on app server since unit test just runs was one (main) thread.

                 

                Any thoughts are more than welcome.

                • 5. Re: Async fork error with jBPM 4.3
                  kukeltje
                  Not sure about 4.3 unittest vs AS, but since things work now with 4.4 trunk (4.4 will probably be release 1/4) and I know there have been changes related to concurrency, forks and endings, I'm inclined not to look into this for 4.3 any further...
                  • 6. Re: Async fork error with jBPM 4.3
                    swiderski.maciej

                    Huge thanks Ronald. I will wait for 4.4 release to make sure it is solved. In meantime will give it a try to configure AS with 4.4-SNAPSHOT and post back the result of it.

                     

                    Cheers,

                    Maciej

                    • 7. Re: Async fork error with jBPM 4.3
                      kukeltje
                      Uhhmmm you said it worked with 4.4-SNAPSHOT... was that only in unitest? the jars of 4.4 should be a drop-in replacement for 4.3, so no configuring needed. If it does not work with 4.4 in AS we have to look further but no guarantees then that it is solved for 4.4
                      • 8. Re: Async fork error with jBPM 4.3
                        swiderski.maciej

                        Hi,

                         

                        Yes, it was only with unit test that worked. I tried it on AS with 4.4 and unfortunately it is the same error.

                         

                        BTW, I had to upgrade el-api.jar inside common/lib on JBoss AS 5.1.0 to make it to work. It complained about NoSuchMethodExcpetion.

                        org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance(Ljava/util/Properties;)Ljavax/el/ExpressionFactory;
                        

                         

                        It looks like three jobs are started and somehow they conflict with each other.