Announcement Announcement Module
No announcement yet.
Side effect of loglevel: java.lang.IllegalArgumentException: step execution is expect Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Side effect of loglevel: java.lang.IllegalArgumentException: step execution is expect

    Dear forum

    I experience an exceptional behavior with spring-batch-1.1.2-RELEASE.
    It's hard for me to explain/understand the situation so i attached an eclipse maven workspace as reconstruction.

    The batch can be started by running FirstJobFunctionalTests.
    The batch consists of two steps each processing two items doing nothing except throwing an exception in the 2nd step at the 2nd item.
    The batch uses only MapDAOs.
    The batch uses ThreadPoolTaskExecutor (with only one thread in the example).

    Running the batch you'll get the mentioned exception.
    The exception can be avoided simply by changing the loglevel of TransactionSynchronizationManager below debug.
    (I configured log4j because it was already in the maven dependencies, the configuration is in src/main/resources/log4j.xml)

    So all i can say is that "it is some side effect of an intercepted call to toString" :S
    Could someone please explain me what i am experiencing.
    Can i avoid it (leaving the loglevel at debug)?
    Is the behavior worth a jira issue?

    I realize the long subject got cutted, so here again the full stacktrace:
    java.lang.IllegalArgumentException: step execution is expected to be already saved
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at org.springframework.batch.core.repository.dao.MapS tepExecutionDao.updateStepExecution(MapStepExecuti
    at SimpleJobRepository.saveOrUpdate(SimpleJobReposito
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    at java.lang.reflect.Method.invoke(
    at npointUsingReflection(
    at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :149)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(
    at $Proxy2.saveOrUpdate(Unknown Source)
    at org.springframework.batch.core.step.item.ItemOrien tedStep.processRollback(
    at org.springframework.batch.core.step.item.ItemOrien tedStep.access$1000(
    at org.springframework.batch.core.step.item.ItemOrien tedStep$1.doInIteration(
    at torRepeatTemplate$
    at java.util.concurrent.ThreadPoolExecutor$ Task(
    at java.util.concurrent.ThreadPoolExecutor$ (
    Last edited by dominic.stoll; Oct 1st, 2008, 01:36 AM.

  • #2
    I see the attachment still has 0 views. Is there another preferred way to attach examples?


    • #3
      Try using nopaste:

      It will give you a link you can reference, it's much easier than a zip file that people have to extract.