[현상 및 에러로그]

bad SQL grammar [SELECT E.JOB_EXECUTION_ID, E.START_TIME, E.END_TIME, E.STATUS, E.EXIT_CODE, E.EXIT_MESSAGE, E.CREATE_TIME, E.LAST_UPDATED, E.VERSION, E.JOB_INSTANCE_ID, E.JOB_CONFIGURATION_LOCATION from bomdb.BATCH_JOB_EXECUTION E, bomdb.BATCH_JOB_INSTANCE I where E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID and I.JOB_NAME=? and E.START_TIME is not NULL and E.END_TIME is NULL order by E.JOB_EXECUTION_ID desc]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'E.JOB_CONFIGURATION_LOCATION' in 'field list'

 

[원인 및 해결]

spring batch 버전이 올라가면서 메타데이터 스키마가 변경되었음.

BATCH_JOB_EXECUTION_PARAMS 테이블 추가.

BATCH_JOB_EXECUTION 테이블에 JOB_CONFIGURATION_LOCATION 칼럼 추가.

 

[참고]

https://docs.spring.io/spring-batch/docs/current/reference/html/schema-appendix.html

https://stackoverflow.com/questions/25882740/unknown-column-job-configuration-location-in-field-list-while-using-spring-b

반응형

+ Recent posts