본문 바로가기
개발공부/Error

[spring] org.mybatis.spring.MyBatisSystemException: 시큐리티, 회원도메인, 회원 Mapper설계

by dokii 2021. 10. 7.
728x90
반응형

요즘은 코드로 배우는 스프링 웹 프로젝트라는 책을 보면서 회원부분을 작업중이다.

--

 

에러 메세지

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: java.lang.NullPointerException
### The error may exist in com/dohyeong/mapper/MemberMapper.xml
### The error may involve com.dohyeong.mapper.MemberMapper.read
### The error occurred while handling results
### SQL: SELECT     mem.userid, userpw, username, enabled, regdate, updatedate, auth   FROM     tbl_member mem LEFT OUTER JOIN      tbl_member_auth auth on mem.userid=auth.userid   WHERE mem.userid = ?
### Cause: java.lang.NullPointerException

 

쿼리문을 디비에서 확인해봤을때는 잘나왔으니까...

다른데서 문제가 있겠지.

 

https://jamong-icetea.tistory.com/67

 

[Spring] [MyBatis 에러] Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for

심각: Servlet.service() for servlet [action] in context with path [/myweb2] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exceptio..

jamong-icetea.tistory.com

블로그를 참고한 결과 mapper id나,, 무언가 연결이 안되는거니까 오타라고 생각해서 찾아보니

해당 부분을 column이라고 적었더라..

지정된 memberMap은 하나의 쿼리로 MemberVo와 AuthVO의 리스트까지 같이 처리할수 있다.

(이를 1+N관계라고 부른다고 한다.) 

(해당 책의 660페이지 참고)

728x90
반응형

댓글