AnsweredAssumed Answered

Activiti and Spring Batch

Question asked by danielbreitner on Dec 21, 2011
Latest reply on Dec 21, 2011 by danielbreitner
Hi Folks,

lots and lots of problems with activiti in our project.

What I am currently trying to do is to launch a spring batch job from within activiti.



But whenever I start the spring batch job I get the exception you can see down here.

One question: Is there anything that I need to think of, when using spring batch together with activiti?


[size=85]
java.lang.IllegalStateException: Existing transaction detected in JobRepository. Please fix this and try again (e.g. remove @Transactional annotations from client).
        at org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean$1.invoke(AbstractJobRepositoryFactoryBean.java:164)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy55.createJobExecution(Unknown Source)
        at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:111)
        at org.springframework.batch.test.JobLauncherTestUtils.launchJob(JobLauncherTestUtils.java:151)
        at de.isb.leo.dataimport.tasks.SpringBatchTask.execute(SpringBatchTask.java:107)
        at de.isb.leo.dataimport.tasks.SpringBatchTask.start(SpringBatchTask.java:82)
        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)[/size]

Outcomes