ejyoo's 개발 노트

org.apache.ibatis.exceptions.PersistenceException: 본문

BackEnd/Java Exception 처리

org.apache.ibatis.exceptions.PersistenceException:

ejyoovV 2021. 5. 30. 12:17

발생 사유

쿼리에서 실행해야 할 ParameterType 매핑 시 매핑이 제대로 되지 않아 발생

 

원인

DAO에서 쿼리 실행 시 파라미터를 넘겨주지 않았음.

 

org.apache.ibatis.exceptions.PersistenceException: 

### Error updating database.  Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='pwd', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 부적합한 열 유형: 1111

### The error may exist in kr/or/ddit/mybatis/Member-Mapper.xml

### The error may involve Member-Mapper.updateMember-Inline

### The error occurred while setting parameters

### SQL: update member set       ,pwd = ?       ,email = ?       ,phone = ?   where id = ?

### Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='pwd', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 부적합한 열 유형: 1111