Announcement Announcement Module
Collapse
No announcement yet.
OptimisticLockingFailureException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OptimisticLockingFailureException

    should not be this Locking failure handled internally by spring batch - retry request and not complain to user and fail job?

    Code:
    2013-01-09 17:24:27,325 ERROR [main] org.springframework.batch.core.step.AbstractStep: Encountered an error saving batch meta data. This job is now in an unknown state and should not be restarted.
    org.springframework.dao.OptimisticLockingFailureException: Attempt to update step execution id=1 with wrong version (2), where current version is 3
    	at org.springframework.batch.core.repository.dao.MapStepExecutionDao.updateStepExecution(MapStepExecutionDao.java:98)
    	at org.springframework.batch.core.repository.support.SimpleJobRepository.update(SimpleJobRepository.java:171)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

  • #2
    That depends on the scenario that caused it. Can you please elaborate on the job that caused this exception?

    Comment


    • #3
      its job interrupt
      Code:
      org.springframework.batch.core.JobInterruptedException: Job interrupted status detected.
      	at org.springframework.batch.core.step.ThreadStepInterruptionPolicy.checkInterrupted(ThreadStepInterruptionPolicy.java:42)
      	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:277)
      	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
      	at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:258)
      	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)

      Comment

      Working...
      X