Announcement Announcement Module
Collapse
No announcement yet.
Side effect of loglevel: java.lang.IllegalArgumentException: step execution is expect Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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 onDao.java:77)
    at org.springframework.batch.core.repository.support. SimpleJobRepository.saveOrUpdate(SimpleJobReposito ry.java:244)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:310)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy2.saveOrUpdate(Unknown Source)
    at org.springframework.batch.core.step.item.ItemOrien tedStep.processRollback(ItemOrientedStep.java:435)
    at org.springframework.batch.core.step.item.ItemOrien tedStep.access$1000(ItemOrientedStep.java:68)
    at org.springframework.batch.core.step.item.ItemOrien tedStep$1.doInIteration(ItemOrientedStep.java:347)
    at org.springframework.batch.repeat.support.TaskExecu torRepeatTemplate$ExecutingRunnable.run(TaskExecut orRepeatTemplate.java:215)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Last edited by dominic.stoll; Oct 1st, 2008, 02:36 AM.

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

    Comment


    • #3
      Try using nopaste:

      http://rafb.net/paste/

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

      Comment

      Working...
      X