본문 바로가기
spring/eGov

[eGov-ibatis]com.ibatis.common.beans.probeexception:this is no READABLE property named '변수명' in class '클래스명' 해결방법

by 헤르쯔44 2022. 6. 24.
728x90
반응형

com.ibatis.common.beans.probeexception: this is no READABLE property named ~


원인

1.prameterClass의 변수명과 xml ID값이 일치하지 않는 경우
2.단일 파라미터일때 isNotEmpty에 property를 설정할 경우

 

ibatis, sqlmap xml파일에서 발생하는 오류

prameterClass의 변수명과 xml ID값이 일치하지 않는 경우 발생한다.

내경우는 파라미터값을 하나만 넘겨줘서 String 값으로  prameterClass를 설정했는데 

위와 같은 에러 발생..변수명에는 다른게 없는데 왜 날까 했더니  

단일 파라미터인 경우는 isNotEmpty에 property를 설정하면 안된다고 한다.

 

해결방법

1.단일 파라미터인 경우는 isNotEmpty에 property 제거

2.객체로 넘길경우 VO객체에 변수명이 일치하는지 확인

-수정전 코드

<sqlMap>


<select id="test" resultClass="Map" parameterClass="String">
  select * from '테이블명'
  <isNotEmpty property="변수명">
  where 변수명=#변수명#
  </isNotEmpty>

</sqlMap>

-수정코드

<sqlMap>


<select id="test" resultClass="Map" parameterClass="String">
  select * from '테이블명'
  <isNotEmpty>
  where 변수명=#변수명#
  </isNotEmpty>

</sqlMap>

 

728x90
반응형

'spring > eGov' 카테고리의 다른 글

전자정부 프레임워크 페이징처리-메모  (0) 2022.04.22