Announcement Announcement Module
Collapse
No announcement yet.
Spring batch job failure :org.springframework.dao.OptimisticLockingFailureE xception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring batch job failure :org.springframework.dao.OptimisticLockingFailureE xception

    We currently have a batch job running on tomcat in production that is running after every 5 minutes and it is failing after a few days with the below error . We subsequently re start the server and the issue gets fixed for few days and again we see it failing as below . I checked on forums with people pointing out to spring batch version issue
    , we are using spring batch version 2.1.2 . Additionally we have other spring batch jobs running on different servers but using the same spring batch tables .Any help on what can be done to resolve the issue will be highly appreciated .

    Caused by: org.springframework.dao.OptimisticLockingFailureEx ception: Attempt
    to update step execution id=47146 with wrong version (0), where current version
    is 0

    status=FAILED,
    exitStatus=exitCode=FAILED;exitDescription=org.spr ingframework.batch.core.JobExecutionException:
    Flow execution ended unexpectedly
    at
    org.springframework.batch.core.job.flow.FlowJob.do Execute(FlowJob.java:141)
    at
    org.springframework.batch.core.job.AbstractJob.exe cute(AbstractJob.java:281)
    at
    org.springframework.batch.core.launch.support.Simp leJobLauncher$1.run(SimpleJobLauncher.java:120)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: org.springframework.batch.core.job.flow.FlowExecut ionException:
    Ended flow=rhapsodyMessageJob at
    state=rhapsodyMessageJob.processRhapsodyQueuedMess agesStep with exception
    at
    org.springframework.batch.core.job.flow.support.Si mpleFlow.resume(SimpleFlow.java:152)
    at
    org.springframework.batch.core.job.flow.support.Si mpleFlow.start(SimpleFlow.java:124)
    at
    org.springframework.batch.core.job.flow.FlowJob.do Execute(FlowJob.java:135)
    ... 3 more
    Caused by: org.springframework.dao.OptimisticLockingFailureEx ception: Attempt
    to update step execution id=47146 with wrong version (0), where current version
    is 0
    at
    org.springframework.batch.core.repository.dao.Jdbc StepExecutionDao.updateStepExecution(JdbcStepExecu tionDao.java:185)
    at
    org.springframework.batch.core.repository.support. SimpleJobRepository.update(SimpleJobRepository.jav a:171)
    at sun.reflect.GeneratedMethodAccessor31.invoke(Unkno wn Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:309)
    at
Working...
X