본문 바로가기

ErrorLog

java.sql.SQLException: 부적합한 열 유형: 1111

Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter # 2 with JdbcType OTHER.Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property

 

1. 원인 : SQL 로 넘어간 parameter 에 null 이 셋팅됨. 

 

2. 방법 :

   1) Cause 를 따라 ServiceImpl 에서 실행한 SQL 문의 파라미터 디버깅. 

   2) Insert 문이었는데, 다른 SQL 문 살펴보니 varchar 일 경우 JdbcType 을 지정해주고 있음.  

 

3. 해결 : 파라미터가 varchar 일 경우 #{name, jdbcType=VARCHAR} 추가