Notice
Recent Posts
Recent Comments
Link
새로운시작
Value '0000-00-00' can not be represented as java.sql.Date 본문
Value '0000-00-00' can not be represented as java.sql.Date 에러
1. 원인
select 하려는 테이블에 타입이 date인 컬럼이 있다.
이 컬럼의 데이터값이 0000-00-00(null) 로 들어가있는데, 이걸 select 하려고 하다보니 생기는 에러
2. 해결
jdbc.propertis에
jdbc.url << 이 있다.
jdbc:mysql://localhost/(각자이름)?zeroDateTimeBehavior=convertToNull
진하게 표시되어있는걸 추가해주면 date가 null 이여도 정상적으로 돌아간다.
'ERROR' 카테고리의 다른 글
Ambiguous mapping found. Cannot map ~~ (0) | 2017.07.31 |
---|---|
Several ports (8080, 8009) required by Tomcat v6.0 Server at localhost are already in use. (0) | 2017.07.18 |
org.springframework.jdbc.BadSqlGrammarException (0) | 2017.07.17 |
Column count doesn't match value count at row 1 (0) | 2017.07.17 |