1 2 Previous Next 17 Replies Latest reply on Apr 18, 2010 10:51 AM by swiderski.maciej

    Async Fork Transaction Issues

    rhodos

      Hi,

       

      I am trying to get an async fork test process working on jBPM 4.3.  I am using the HSQLDB with the default configuration except that the job executor is activated to allow concurrency.  The process just forks into two custom nodes, A and B, where their names should be printed 5 times with pauses in between each print.  It works as expected in sync mode, but with async, I am having issues:

       

      1) When run as a Java application , the following exception is thrown:


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

       

      2) When run as a unit test, each node only prints its name once, and the test passes.

       

      I know that someone else posted the same error message (See http://community.jboss.org/message/525042#525042) and said that theirs worked as a unit test, and the conclusion was just to wait for 4.4.  However, I really don't have much time!  Can anyone verify whether 4.4 will fix this issue and when is the expected release date, or let me know what I'm doing wrong, or give me advice for a workaround?  

       

      Please help!

      Thanks,

      Rachel

        • 1. Re: Async Fork Transaction Issues
          swiderski.maciej

          HI,

           

          when I run your process (but with my simple test classes - you did not attach source) including your configuration test fails indeed.

           

          What I did to make it to work was to disable jobexecutor in jbpm.cfg.xml. After that change test went well. I tested that for both 4.3 and 4.4.

           

          If that would not help you please post source for custom nodes I will try to dig a bit deeper.

           

          HTH

          Maciej

          • 2. Re: Async Fork Transaction Issues
            rhodos

            Hi,

             

            Sorry about that, here is the sourcecode.

             

            The problem is that I need it to work with the job executor, because I need concurrent forked executions.

             

            Thanks for looking into it.

             

            Rachel

            • 3. Re: Async Fork Transaction Issues
              swiderski.maciej

              Hi Rachel,

               

              took me some time to look deeper into your issue but finally I did it. Here are some explanations:

              2) When run as a unit test, each node only prints its name once, and the test passes.

              This is due to not enough time for job executors to finish their job, I mean that your main thread (junit) will kill all child threads as soon it will go through the loop. Just put a sleep on your main class and you should get all print outs from your custom nodes.

              1) When run as a Java application , the following exception is thrown:


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

              I could reproduce that only when I manually executed job at the same time job executors were running. Moreover, I did deploy it to db and then run it from console and it worked fine. Did you try to run it from console?!

               

              HTH

              Maciej

              • 4. Re: Async Fork Transaction Issues
                rhodos

                Hi Maciej,

                 

                 

                Thanks so much for working on this!

                 

                I've been trying to run it from the console but I am having some issue with my configuration (see my other post: http://community.jboss.org/message/535308#535308). 

                 

                Also, what is the point of a unit test? Can this run operationally from the console somehow or is it only meant for testing purposes?

                 

                Rachel

                • 5. Re: Async Fork Transaction Issues
                  swiderski.maciej

                  Hi Rachel,

                   

                  I would say that unit tests are only to verify that everything works as expected in isolation - so yes, only testing purposes.

                   

                  Could you provide some information about how did you install jBPM and details about your environment - what server, what db, etc.

                   

                  Cheers,

                  Maciej

                  • 6. Re: Async Fork Transaction Issues
                    rhodos

                    Maciej,

                     

                    I am using jBPM 4.3 with jBoss, HSQLDB, Java 1.6, on a Linux OS.  I don't know what information I can give about how I installed jBPM; I just add the jar files to my classpath.. I am sending a new copy of my source code, as it's slightly changed, and I'm also attaching the the parser I'm using.  The error seems to be with parsing jbpm.cfg.xml.  No matter how I change this file (I've tried unchanged, removing the first line, commenting everything out, etc.), I get this error: 

                     

                     

                    Exception in thread "main" java.lang.ExceptionInInitializerError
                    at org.jbpm.pvm.internal.cfg.ConfigurationParser.<init>(ConfigurationParser.java:46)
                    at org.jbpm.pvm.internal.cfg.ConfigurationParser.<clinit>(ConfigurationParser.java:49)
                    at org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:139)
                    at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:118)
                    at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:52)
                    at org.jbpm.api.Configuration.setResource(Configuration.java:74)
                    at jpl.mipl.pgs.test.ConcurrencyTest.initialize(ConcurrencyTest.java:30)
                    at org.jbpm.test.JbpmTestCase.setUp(JbpmTestCase.java:78)
                    at jpl.mipl.pgs.test.ConcurrencyTest.setUp(ConcurrencyTest.java:47)
                    at jpl.mipl.pgs.test.ConcurrencyTest.main(ConcurrencyTest.java:83)
                    Caused by: org.jbpm.api.JbpmException:
                      error: couldn't parse xml document : org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
                    at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:175)
                    at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
                    at org.jbpm.pvm.internal.xml.Parse.checkErrors(Parse.java:190)
                    at org.jbpm.pvm.internal.wire.xml.WireParser.<clinit>(WireParser.java:284)
                    ... 10 more
                    Caused by: org.jbpm.api.JbpmException
                    at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:171)
                    ... 13 more
                    Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
                    at org.apache.xerces.dom.CoreDocumentImpl.createElementNS(Unknown Source)
                    at org.apache.xerces.dom.DOMImplementationImpl.createDocument(Unknown Source)
                    at org.jbpm.pvm.internal.xml.Parser.buildDom(Parser.java:442)
                    at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:389)
                    at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)
                    Any ideas?
                    Rachel
                    • 7. Re: Async Fork Transaction Issues
                      rebody

                      Hi  Rachel,

                        The error is most likely there is invalid character in the jbpm.cfg.xml. I am afraid your jbpm.cfg.xml may be broken by some reason. You should find a new jbpm.cfg.xml from jBPM distribution, overwrite the old one, and try again.

                      • 8. Re: Async Fork Transaction Issues
                        swiderski.maciej

                        Hi,

                         

                        I am not sure it should be xerces - at least it is not part of jBPM distribution.

                         

                        I would suggest to create your class path strictly based on following libraries:

                        - ${jbpm43.home}/jbpm.jar

                        - ${jbpm43.home}/*.jar

                         

                        Of course you could add your own classes as well but please be careful with adding any xml parsers.

                         

                        Cheers,

                        Maciej

                        • 9. Re: Async Fork Transaction Issues
                          rhodos

                          Maciej,

                           

                          You're right- I don't get that error when I simplify my classpath to include only jbpm jars.  This is good! :]

                           

                          Now, when you said that you got it working from the console, did it work with the threads running concurrently (i.e. printing something like "A, B, A, A, B.."?

                           

                          Rachel

                          • 10. Re: Async Fork Transaction Issues
                            swiderski.maciej

                            Yes, it did print it properly.

                             

                            /Maciej

                            • 11. Re: Async Fork Transaction Issues
                              rhodos

                              This is great news for me! Are you using HSQLDB? With READ_UNCOMMITTED isolation?

                              • 12. Re: Async Fork Transaction Issues
                                swiderski.maciej

                                yes exactly same settings as described above.

                                 

                                /Maciej

                                • 13. Re: Async Fork Transaction Issues
                                  rhodos

                                  Maciej,

                                   

                                  With the source code I sent you, I get a NullPointerException because repositoryService isn't defined. 

                                   

                                  When I add the following lines to the end of ConcurrencyTest.initialize() (and import the RepositoryService class):

                                      repositoryService = processEngine.get(RepositoryService.class);

                                      executionService = processEngine.getExecutionService();

                                  the process gets farther but then throws the following exception:
                                       13:48:55,893 INF   | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.SignalCmd@15a4523

                                       org.jbpm.api.JbpmException: execution[TestConcurrencySimple.7.to A] is not active: async

                                   

                                  Then, if I comment out signalExecutionById, I get the original exception I was complaining about:

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

                                   

                                  How the heck did you get my source code to work??

                                   

                                  (Sorry to keep throwing new questions at you.)

                                  Rachel

                                   

                                   

                                  Full output from last scenario:

                                   

                                  java jpl.mipl.pgs.test.ConcurrencyTest

                                  ConcurrencyTest.main, beginning

                                  ConcurrencyTest, before super.setup()

                                  jpl/mipl/pgs/test/jbpm.cfg.xml

                                  building ProcessEngine from resource jpl/mipl/pgs/test/jbpm.cfg.xml

                                  14:02:57,395 INF | [DispatcherThread] starting DispatcherThread

                                  14:02:57,432 INF   | [Environment] Hibernate 3.3.1.GA

                                  14:02:57,445 INF   | [Environment] hibernate.properties not found

                                  14:02:57,457 INF   | [Environment] Bytecode provider name : javassist

                                  14:02:57,473 INF   | [Environment] using JDK 1.4 java.sql.Timestamp handling

                                  14:02:57,632 INF   | [Configuration] configuring from resource: jbpm.hibernate.cfg.xml

                                  14:02:57,633 INF   | [Configuration] Configuration resource: jbpm.hibernate.cfg.xml

                                  14:02:57,752 INF   | [Configuration] Reading mappings from resource : jbpm.repository.hbm.xml

                                  14:02:58,233 INF   | [Configuration] Reading mappings from resource : jbpm.execution.hbm.xml

                                  14:02:58,668 INF   | [Configuration] Reading mappings from resource : jbpm.history.hbm.xml

                                  14:02:58,901 INF   | [Configuration] Reading mappings from resource : jbpm.task.hbm.xml

                                  14:02:59,014 INF   | [Configuration] Reading mappings from resource : jbpm.identity.hbm.xml

                                  14:02:59,098 INF   | [Configuration] Configured SessionFactory: null

                                  14:02:59,162 INF   | [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)

                                  14:02:59,163 INF   | [DriverManagerConnectionProvider] Hibernate connection pool size: 20

                                  14:02:59,164 INF   | [DriverManagerConnectionProvider] autocommit mode: false

                                  14:02:59,194 INF   | [DriverManagerConnectionProvider] using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:mem:.

                                  14:02:59,195 INF   | [DriverManagerConnectionProvider] connection properties: {user=sa, password=****}

                                  14:02:59,698 INF   | [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect

                                  14:02:59,729 INF   | [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)

                                  14:02:59,736 INF   | [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)

                                  14:02:59,750 INF   | [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory

                                  14:02:59,914 INF   | [SessionFactoryImpl] building session factory

                                  14:03:01,825 INF   | [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured

                                  14:03:01,851 INF   | [SchemaExport] Running hbm2ddl schema export

                                  14:03:01,853 INF   | [SchemaExport] exporting generated schema to database

                                  14:03:01,906 INF   | [SchemaExport] schema export complete

                                  14:03:02,643 INF   | [CheckDbCmd] jBPM version info: library[4.3], schema[null]

                                  ConcurrencyTest, after super.setup()

                                  setUp completed...

                                  testActivityOrder: number of children = 2

                                  testActivityOrder: signaling TestConcurrencySimple.7.to A

                                  testActivityOrder: signaling TestConcurrencySimple.7.to B

                                  ConcurrencyTest.main, after testActivityOrder

                                  my name is A

                                  my name is B

                                  concurrencyTest.main, after tearDown

                                  my name is A

                                  my name is B

                                  my name is A

                                  my name is A

                                  my name is B

                                  my name is A

                                  my name is B

                                  In PrintNameMulti: state of execution: active-concurrent

                                  In PrintNameMulti: execution id: TestConcurrencySimple.7.to A

                                  my name is A2

                                  14:03:09,097 WRN     | [HSQLDialect] HSQLDB supports only READ_UNCOMMITTED isolation

                                  ### EXCEPTION ###########################################

                                  14:03:09,108 SEV     | [ExecuteJobCmd] exception while executing 'message[9]'

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

                                  at org.hibernate.dialect.lock.SelectLockingStrategy.lock(SelectLockingStrategy.java:102)

                                  at org.hibernate.dialect.HSQLDialect$ReadUncommittedLockingStrategy.lock(HSQLDialect.java:306)

                                  at org.hibernate.persister.entity.AbstractEntityPersister.lock(AbstractEntityPersister.java:1361)

                                  at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:108)

                                  at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:87)

                                  at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)

                                  at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:68)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:49)

                                  at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)

                                  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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.performAtomicOperationSync(ExecutionImpl_$$_javassist_5.java)

                                  at org.jbpm.pvm.internal.model.op.ExecuteEventListenerMessage.execute(ExecuteEventListenerMessage.java:154)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:76)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:42)

                                  at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

                                  at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)

                                  at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)

                                  at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)

                                  at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48)

                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                                  at java.lang.Thread.run(Thread.java:619)

                                  ### EXCEPTION ###########################################

                                  ### EXCEPTION ###########################################

                                  14:03:09,117 INF     | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.ExecuteJobCmd@1a998c7

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

                                  at org.hibernate.dialect.lock.SelectLockingStrategy.lock(SelectLockingStrategy.java:102)

                                  at org.hibernate.dialect.HSQLDialect$ReadUncommittedLockingStrategy.lock(HSQLDialect.java:306)

                                  at org.hibernate.persister.entity.AbstractEntityPersister.lock(AbstractEntityPersister.java:1361)

                                  at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:108)

                                  at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:87)

                                  at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)

                                  at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:68)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:49)

                                  at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)

                                  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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.performAtomicOperationSync(ExecutionImpl_$$_javassist_5.java)

                                  at org.jbpm.pvm.internal.model.op.ExecuteEventListenerMessage.execute(ExecuteEventListenerMessage.java:154)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:76)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:42)

                                  at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

                                  at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)

                                  at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)

                                  at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)

                                  at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48)

                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                                  at java.lang.Thread.run(Thread.java:619)

                                  ### EXCEPTION ###########################################

                                  my name is B

                                  In PrintNameMulti: state of execution: active-concurrent

                                  In PrintNameMulti: execution id: TestConcurrencySimple.7.to B

                                  my name is B2

                                  14:03:11,700 WRN       | [HSQLDialect] HSQLDB supports only READ_UNCOMMITTED isolation

                                  ### EXCEPTION ###########################################

                                  14:03:11,702 SEV       | [ExecuteJobCmd] exception while executing 'message[12]'

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

                                  at org.hibernate.dialect.lock.SelectLockingStrategy.lock(SelectLockingStrategy.java:102)

                                  at org.hibernate.dialect.HSQLDialect$ReadUncommittedLockingStrategy.lock(HSQLDialect.java:306)

                                  at org.hibernate.persister.entity.AbstractEntityPersister.lock(AbstractEntityPersister.java:1361)

                                  at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:108)

                                  at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:87)

                                  at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)

                                  at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:68)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:49)

                                  at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)

                                  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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.performAtomicOperationSync(ExecutionImpl_$$_javassist_5.java)

                                  at org.jbpm.pvm.internal.model.op.ExecuteEventListenerMessage.execute(ExecuteEventListenerMessage.java:154)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:76)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:42)

                                  at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

                                  at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)

                                  at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)

                                  at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)

                                  at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48)

                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                                  at java.lang.Thread.run(Thread.java:619)

                                  ### EXCEPTION ###########################################

                                  ### EXCEPTION ###########################################

                                  14:03:11,703 INF       | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.ExecuteJobCmd@1fd9cd5

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

                                  at org.hibernate.dialect.lock.SelectLockingStrategy.lock(SelectLockingStrategy.java:102)

                                  at org.hibernate.dialect.HSQLDialect$ReadUncommittedLockingStrategy.lock(HSQLDialect.java:306)

                                  at org.hibernate.persister.entity.AbstractEntityPersister.lock(AbstractEntityPersister.java:1361)

                                  at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:108)

                                  at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:87)

                                  at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)

                                  at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:68)

                                  at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:49)

                                  at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)

                                  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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)

                                  at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.performAtomicOperationSync(ExecutionImpl_$$_javassist_5.java)

                                  at org.jbpm.pvm.internal.model.op.ExecuteEventListenerMessage.execute(ExecuteEventListenerMessage.java:154)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:76)

                                  at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:42)

                                  at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

                                  at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)

                                  at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)

                                  at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)

                                  at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48)

                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                                  at java.lang.Thread.run(Thread.java:619)

                                  ### EXCEPTION ###########################################

                                  • 14. Re: Async Fork Transaction Issues
                                    swiderski.maciej

                                    true, I am not using your class for execution i use regular test case that extends JbpmTestCase.

                                     

                                    /Maciej

                                    1 2 Previous Next