Announcement Announcement Module
Collapse
No announcement yet.
No enum const class org.springframework.batch.core.BatchStatus.FINISHE D Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No enum const class org.springframework.batch.core.BatchStatus.FINISHE D

    We found this exception in our log after the app has been running smoothly for a few days. FINISHED is not a member of BatchStatus, but of RepeatStatus instead -- what could be the problem?

    For version 2.1.4.RELEASE.

    Code:
    ERROR 09:25:52,547 [spring-scheduler-2] () org.springframework.scheduling.support.MethodInvokingRunnable - Invocation of method 'exampleJob' on target class [class com.example.JobRunner] failed
    java.lang.IllegalArgumentException: No enum const class org.springframework.batch.core.BatchStatus.FINISHED
            at java.lang.Enum.valueOf(Enum.java:196)
            at org.springframework.batch.core.BatchStatus.valueOf(BatchStatus.java:25)
            at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao$JobExecutionRowMapper.mapRow(JdbcJobExecutionDao.java:315)
            at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao$JobExecutionRowMapper.mapRow(JdbcJobExecutionDao.java:291)
            at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
            at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:1)
            at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
            at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:665)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:673)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
            at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:200)
            at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:205)
            at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao.getLastJobExecution(JdbcJobExecutionDao.java:223)
            at org.springframework.batch.core.repository.support.SimpleJobRepository.getLastJobExecution(SimpleJobRepository.java:257)
            at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            at $Proxy27.getLastJobExecution(Unknown Source)
            at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:94)
            at com.example.JobRunner.exampleJob(JobRunner.java:71)

  • #2
    Weird. Someone is screwing with your database? I'm pretty certain that Spring Batch would never insert "FINISHED" into the JobExecution database table anywhere.

    Comment

    Working...
    X