[에러해결] IntelliJ | Mapped Statements collection already contains value for Mapper

Hyeongmin Jung·2024년 5월 13일
0

Error

목록 보기
10/13

IntelliJ

  • java.lang.IllegalStateException: Failed to load ApplicationContext
  • Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in URL [file:src/main/webapp/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.
  • Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.fastcampus.ch4.dao.BoardMapper.select. please check file
  • Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.
  • Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.fastcampus.ch4.dao.BoardMapper.select. please check file
  • Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.
  • Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.fastcampus.ch4.dao.BoardMapper.select. please check file
  • Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.fastcampus.ch4.dao.BoardMapper.select. please check file

✊🏻문제 원인

Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.fastcampus.ch4.dao.BoardMapper.select. please check file

mapper에 중복되는 id가 존재하여 에러 발생

✨해결 방법

중복된 select와 selectPage를 제거

0개의 댓글