본문 바로가기
🍃SpringFrameworks/SpringMVC

[springMVC] 에러 노트

by inbeom 2023. 8. 19.
728x90

SpringMVC 개발 중 발생한 에러를 정리하는 곳입니다.

 

MyBatis 버전 에러

에러 코드

- Error creating bean with name 'sqlSessionFactory' defined in URL [file:src/main/webapp/WEB-INF/spring/root-context.xml]: Instantiation of bean failed;

발생 원인

- pom.xml에 등록된 mybatis와 mybatis-spring의 버전이 맞지 않음

해결 방법

- mvnrepository에서 mybatis-spring버전과 맞는 mybatis 의존성을 추가.


mapper 경로 문제

에러 코드

- Error creating bean with name 'sqlSessionFactory' defined in URL [file:src/main/webapp/WEB-INF/spring/root-context.xml]: Invocation of init method failed;

발생 원인

- root-context.xml에 경로를 제대로 작성하지 않음

해결 방법

- root-context.xml 파일 안의 실제 Mapper.xml경로 맞게 작성


디버거 포트 문제

에러 코드

- Unable to open debugger port (127.0.0.1:61197): java.net.BindException "Address already in use: bind"

발생 원인

- 디버거 포트 중복

해결 방법

- 디버거 포트 변경

 

 

 

 

 

 

Continu to Update..

728x90