-
1. Re: strange problem with many-to-one mapping in jbpm 3.2
camunda Apr 6, 2007 7:37 AM (in response to camunda)I played arount with the ID Generator setting, but nothing changed :-(
-
2. Re: strange problem with many-to-one mapping in jbpm 3.2
brittm Apr 6, 2007 12:17 PM (in response to camunda)I don't have an answer, but simply for comparison, I don't seem to be having those kinds of issues with 3.2.GA.
I'm running on Oracle against an existing 3.1.2 database on which I ran the (slightly modified) update scripts.
-Britt -
3. Re: strange problem with many-to-one mapping in jbpm 3.2
camunda Apr 6, 2007 12:26 PM (in response to camunda)Hi Britt,
I also have a updates 3.1.2 databases updated. But that seems not to be the problem. The problem is really I think the ID generation. But I don't understand why.... -
4. Re: strange problem with many-to-one mapping in jbpm 3.2
camunda Apr 8, 2007 12:40 PM (in response to camunda)Okay, I have investigated further.
I use the DeployProcessCommand (committed to CVS HEAD one minute ago). If I call that from a test case in the jbpm project (which goes directly to the database), everything is working fine. Even if I switch to mySQL for the test-cases, no problem.
No I execute exactly the same command (with exactly the same process) inside a EJB 3.0 SessionBean, where the JbpmContext is injected from the JBoss AS (with mySQL as a local-tx-datasource), then I have a lot of NULL values in my many-to-one mappings.
Maybe it has something to do with the JTA environment. But I don't know why. And where is the difference to jbpm 3.1? -
5. Re: strange problem with many-to-one mapping in jbpm 3.2
camunda Apr 9, 2007 5:40 AM (in response to camunda)Okay, one day later and one small step further, I compared the logs of the JTA-run:
[org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[tx, message, scheduler, logging, persistence, authentication]' [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@1a890f [com.camunda.toolkit.jbpm.service.CommandServiceBean] executing org.jbpm.command.DeployProcessCommand@1c3dfe... [org.jbpm.command.DeployProcessCommand] parse process from String [org.jbpm.command.DeployProcessCommand] deploy process: <process-definition name='Test2'><start-state name='start'></start-state></process-definition> [org.jbpm.graph.node.NodeTypes] node 'page' will not be available. class 'org.jboss.seam.pageflow.Page' couldn't be loaded [org.jbpm.graph.node.NodeTypes] node 'start-page' will not be available. class 'org.jboss.seam.pageflow.Page' couldn't be loaded [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction [STDOUT] Hibernate: select processdef0_.ID_ as ID1_50_, processdef0_.NAME_ as NAME3_50_, processdef0_.DESCRIPTION_ as DESCRIPT4_50_, processdef0_.VERSION_ as VERSION5_50_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_50_, processdef0_.STARTSTATE_ as STARTSTATE7_50_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ? [STDOUT] Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, DESCRIPTION_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_, CLASS_) values (?, ?, ?, ?, ?, 'P') [STDOUT] Hibernate: insert into JBPM_NODE (NAME_, DESCRIPTION_, PROCESSDEFINITION_, ISASYNC_, ISASYNCEXCL_, ACTION_, SUPERSTATE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'R') [STDOUT] Hibernate: insert into JBPM_MODULEDEFINITION (NAME_, PROCESSDEFINITION_, CLASS_) values (?, ?, 'C') [STDOUT] Hibernate: insert into JBPM_MODULEDEFINITION (NAME_, PROCESSDEFINITION_, STARTTASK_, CLASS_) values (?, ?, ?, 'T') [org.jbpm.command.DeployProcessCommand] deployment sucessfull [com.camunda.toolkit.jbpm.service.CommandServiceBean] ... finished with org.jbpm.command.DeployProcessCommand@1c3dfe [org.jbpm.JbpmContext] closing JbpmContext [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@186b2ca [org.jbpm.persistence.db.DbPersistenceService] committing hibernate transaction [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@43f7d7 [org.jbpm.svc.Services] closing service 'authentication': org.jbpm.security.authentication.DefaultAuthenticationService@444a8b
and the local Testrun:[main] DEBUG DbPersistenceService : creating hibernate session [main] DEBUG DbPersistenceService : beginning hibernate transaction [main] DEBUG AbstractDbTestCase : [main] DEBUG AbstractDbTestCase : ### starting testProcessDefinitionStartState #################################################### [main] INFO DeployProcessCommand : parse process from String [main] DEBUG DeployProcessCommand : deploy process: <process-definition name='Test2'><start-state name='start'></start-state></process-definition> [main] DEBUG NodeTypes : node 'page' will not be available. class 'org.jboss.seam.pageflow.Page' couldn't be loaded [main] DEBUG NodeTypes : node 'start-page' will not be available. class 'org.jboss.seam.pageflow.Page' couldn't be loaded Hibernate: select processdef0_.ID_ as ID1_0_, processdef0_.NAME_ as NAME3_0_, processdef0_.DESCRIPTION_ as DESCRIPT4_0_, processdef0_.VERSION_ as VERSION5_0_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_0_, processdef0_.STARTSTATE_ as STARTSTATE7_0_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ? Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, DESCRIPTION_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_, CLASS_) values (?, ?, ?, ?, ?, 'P') Hibernate: insert into JBPM_NODE (NAME_, DESCRIPTION_, PROCESSDEFINITION_, ISASYNC_, ISASYNCEXCL_, ACTION_, SUPERSTATE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'R') Hibernate: insert into JBPM_MODULEDEFINITION (NAME_, PROCESSDEFINITION_, CLASS_) values (?, ?, 'C') Hibernate: insert into JBPM_MODULEDEFINITION (NAME_, PROCESSDEFINITION_, STARTTASK_, CLASS_) values (?, ?, ?, 'T') [main] INFO DeployProcessCommand : deployment sucessfull [main] DEBUG AbstractDbTestCase : ### testProcessDefinitionStartState done #################################################### [main] DEBUG AbstractDbTestCase : [main] DEBUG JbpmContext : closing JbpmContext [main] DEBUG Services : closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@789869 [main] DEBUG DbPersistenceService : committing hibernate transaction Hibernate: update JBPM_PROCESSDEFINITION set NAME_=?, DESCRIPTION_=?, VERSION_=?, ISTERMINATIONIMPLICIT_=?, STARTSTATE_=? where ID_=? Hibernate: update JBPM_NODE set PROCESSDEFINITION_=?, NODECOLLECTIONINDEX_=? where ID_=? Hibernate: update JBPM_MODULEDEFINITION set PROCESSDEFINITION_=?, NAME_=? where ID_=? Hibernate: update JBPM_MODULEDEFINITION set PROCESSDEFINITION_=?, NAME_=? where ID_=? [main] DEBUG DbPersistenceService : closing hibernate session [main] DEBUG Services : closing service 'tx': org.jbpm.tx.TxService@17e4dee
Really eye-catching is, that in the local Testrun, there are some additonal UPDATES, which are missing in the JTA version. I think, they correct the ID's, because the ID's were generated from the database during the first INSERT and so not known in advance. So we really need these second updates for the many-to-one associations.
But why is that missing in the JTA version? May some small implementation issue in jbpm 3.2. I will investigate further.
And I have created a JIRAA-Issue for that: http://jira.jboss.com/jira/browse/JBPM-944 -
6. Re: strange problem with many-to-one mapping in jbpm 3.2
camunda Apr 9, 2007 6:05 AM (in response to camunda)Okay, I solved it. It was my own silly fault! Sorry for the unnecessary traffic in that forum ;-)
The solution is: Switch the PersistenceService in the jbpm.cfg.xml to "JtaDbPersistenceService". After changing that, it also workes fine with JTA!
Sorry again and happy jbpm'ing again :-) -
7. Re: strange problem with many-to-one mapping in jbpm 3.2
kukeltje Apr 9, 2007 10:00 AM (in response to camunda)I don't mind this kind of traffic. People solving their own problems and reporting the sollution. Others can learn from this... :-)