배치실행환경 DB연결문제
- 작성자 :
- 임*재
- 작성일 :
- 2023-07-10 17:08:55
- 조회수 :
- 1,404
- 구분 :
- 실행환경 / 4.1
- 진행상태 :
- 완료
context-batch-datasource.xml, globals.properties 은 첨부파일과 같이 EDB 연결 정보로 수정하였으며,
edb-jdbc18.jar 로 Build path > Liraries 에 설정하였습니다. 배치실행환경을 Run 하면 아래와 같은 에러가 발생합니다.
자세한 에러내용은 파일 첨부 하였습니다.
그리고, EDB에 대한 sample로 context 에 주석이 없는데, EDB context 설정 가이드가 있으면 부탁드립니다
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eGovBatchRunner' defined in class path resource [egovframework/batch/context-batch-job-launcher.xml]: Cannot resolve reference to bean 'jobOperator' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobOperator' defined in class path resource [egovframework/batch/context-batch-job-launcher.xml]: Cannot resolve reference to bean 'jobLauncher' while setting bean property 'jobLauncher'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobLauncher' defined in class path resource [egovframework/batch/context-batch-job-launcher.xml]: Cannot resolve reference to bean 'jobRepository' while setting bean property 'jobRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobRepository' defined in class path resource [egovframework/batch/context-batch-job-launcher.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: DatabaseType not found for product name: [EnterpriseDB]
-
- OS 정보 : windows
- 표준프레임워크 버전 : 4.1
- JDK(JRE) 정보 : 1.8
- WAS 정보 :
- DB 정보 : EDB
- 기타 환경 정보 :
안녕하세요.
표준프레임워크센터입니다.
spring batch에서 지원 하는 DB는 다음과 같습니다.
https://docs.spring.io/spring-batch/docs/current/api/org/springframework/batch/support/DatabaseType.html
센터에서는 관련 예제에서
Mysql, Tibero, Cubrid, Altibase, Oracle DB에 대해 예시를 제공하고 있으며
EDB에 대한 설정 가이드는 별도로 제공하고 있지 않습니다.
다만,
배치 템플릿에서 Cubrid를 지원하지 않아
유사한 oracle을 databseType으로 지정하고 있습니다.
따라서 Cubrid 설정을 참고하여 시도해 보실수 있을듯 합니다.
다음 설정 파일에서
/src/main/resources/egovframework/spring/com/context-batch-job-launcher.xml
CUBRID용을 주석 해제하고
기존 <bean id="jobRepository" ~~~는 주석처리를 하고 있는데
이를 참고 하실수 있을듯 합니다.
참고로
다음 DB 스키마 스크립트도 사전에 생성 하셔야 합니다.
/src/script/cubrid
해당 스크립트를 참고하여 EDB에 맞게 사용하시길 바랍니다.
감사합니다.