This content has been marked as final.
Show 2 replies
-
1. Re: org.hibernate.HibernateException: null index column for
kukeltje Jul 26, 2008 8:55 AM (in response to clandestino_bgd)to be honest, I do not know why i am posting question on this forum, since I am the one who only answers on them, and I really do not think I will have an answer on this one :)
Sorry, but that might have to do with how questions are posed, what info is provided etc...
- do you use spring jBPM template? if so, ditch it (not spring, just this template, it's officially only for 3.1.x afaik)
- Do both the junit and tomcat use spring?
- Same jbpm config? (not e.g. one without and one with transactions configured)
- same transactionmanager?
- same transactionmanager config?
- if you cut spring out of it (for this specific situation) does it work then?NOTE: since I am using JBPM with spring and within a big enterprise application, I am not able to send short Unit test, that someone can try locally.
Hmm...... strange.... Does this mean you have very few big classes that do a lot of work? -
2. Re: org.hibernate.HibernateException: null index column for
clandestino_bgd Jul 29, 2008 11:29 AM (in response to clandestino_bgd)Hello Ronald, thanks for the reply.
I managed to resolve the problem.
I am answering to your questions below, in case somebody else is also trying to use JBPM inside Appfuse.
- do you use spring jBPM template? if so, ditch it (not spring, just this template, it's officially only for 3.1.x afaik)
Yes, I do. Actually I extend JbpmTemplate from spring modules and it works very well, so for now I do not plan to ditch it.
- Do both the junit and tomcat use spring?
Yes. I am extending AbstractTransactionalDataSourceSpringContextTests in my test classes (one for each process definition). Every method ends with explicit setComplete() call in order to do actual insert in DB. I need that for async exec and callbacks.
- Same jbpm config? (not e.g. one without and one with transactions configured)
Yes, the same jbpmConfig, defined in spring applicationContext.xml (slightly modified spring-modules LocalJbpmConfigurationFactoryBean), loaded by StartupListener and Base Junit test class.
- same transactionmanager?
- same transactionmanager config?
Well, this was the trick. Transactions are declared through AOP originally in appfuse, and I moved my WorkflowManager in another module. That caused all JBPM calls to be outside the transaction. In Junit test the transactions are provided by Spring base Junit test class, so there were no problems.
Btw, I defined a custom DbPersistenceServicefactory, since I had to extend GraphSession and TaskMgmtSession.<service name="persistence"> <factory> <bean class="gleam.executive.workflow.core.JbpmDbPersistenceServiceFactory"> <field name="isTransactionEnabled"><false /></field> </bean> </factory> </service>
This seems to work well.
Does this mean you have very few big classes that do a lot of work?
No, it means that my Junit test are spring dependent. Also, they include some utility classes, since they perform complete process definition tests according to all possible scenarios.
Cheers,
milan