Yesterday, I started with a fresh jBPM installation. I started a number of process instances no problem with the startProcessInstanceByKey() method. The one odd thing is that my process instance ids from yesterday end in even numbers ... 2, 4, 8, etc.
Today, after restarting the jboss app server, I was able to create one process instance with a process instance id ending in 1.
Now I can no longer start process instances with startProcessInstanceByKey(). I get the following exception.
Can someone please help out?
2009-09-15 11:38:42,248 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (http-127.0.0.1-8080-5) Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.history.model.HistoryTaskImpl#2]
I have also seen this problem.
kukeltje, could you be so kind as to post the link to solution as opposed to a link to a lecture.
I searched the user and developer guides. I searched the forum and wiki. I am unable to find the solution. If you know where the answer is, would you please post it to this thread.
If I have a link to the solution, I either post it or tell you to use search functionality. In this case this is not so because I do not know the solution. Besides, it's not a post to a lecture it is a link to a post that describes what to post WHEN you post about something.
It specifically asks for:
- jBPM version
- DBMS (incl. driver)
- Doing the same with debug logging on if possible, etc...
Without this info, in many cases it is hard for us to start helping out at all besides asking these questions. So therefor I posted a link to what is required when posting (saves me several minutes)
Exactly, without a good explanation is is hard for us to guess what is going wrong. There are so many use cases of jBPM out there, multiply this with a gazillion ways how people actually implement them and then you understand it is hard to guess what actually is going on. That is why we are asking for detailed information (db, environment, etc).
I do have a hunch the issue is related to https://jira.jboss.org/jira/browse/JBPM-2510. Tom is currently working on a new key generator (https://jira.jboss.org/jira/browse/JBPM-2526) which will fix this issue (planned for 4.2).
Is there a work around for this? If not, any idea when jbpm 4.2 will be released?
when 4.2 is released can be seen in the roadmap in the wiki (and maybe in the jira) so please have a look there.
- use a different database
- implement a custom id generator yourself
- don't restart things
:-) (just kidding ofcourse)