에러메세지

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;

위와 같은 에러가 났다.

 

분명히 저녁먹기 전에는 잘 됐는데, 밥먹고 재실행을 하니 안되는 어이없는 상황 ㅠㅠ

뭐지.. 왜 잘되다가 안되는거지? ㅠㅠㅠ

한시간 가량 구글링을 거쳐

xml 파일들에 오타 난 것 있는지, mysql설정을 내가 뭘 잘못한건지 웬만한 시도를 다 해보다가 

 

 

 

MyBatis error: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.Type - Programmer Sought

 

MyBatis error: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.Type - Programmer Sought

Cause: java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1). This is a magical bug. When my MyBatis statement: select u.roleId, r.roleName from role r, user u where u.roleId = r.roleId and u.userAccount = The following

www.programmersought.com

위 사이트를 접하게 됐는데,  슥 보고 엥?? 설마 이것때문에? 싶어서 나도 적용해보았는데

너무너무너무너무너무  간단한 방법으로 해결이 되었다.

 

그 간단한 방법...

root-context.xml 상단에 주석이 하나 달려 있었는데, 이걸 지우니까 실행이 된다. 하...

 

한시간동안의 스트레스에서 탈출하게 해줬으니

이 블로거한테 좋아요라도 눌러주고 싶었는데,

외국 블로그는 좋아요 시스템이 없는건지 막아놓은건지 나의 감사함을 표할 길이 없다 ㅠㅠ

 

 

주석이 문제였다면 아깐 왜 잘 됐는지,

왜 주석이 실행에 영향을 미치는건지 아직 내 배움의 수준에서는 알 길이 없지만...

 

그냥 너무 어이없었던 에러 해결 순간이었따...

'SPRING > 나의 고통(Error)' 카테고리의 다른 글

Could not convert socket to TLS  (0) 2021.07.26
servlet.xml에 namespace탭이 안보일 때  (0) 2021.07.22
@GetMapping import 불가  (0) 2021.07.22
Build path entry is missing:  (0) 2021.07.21
Spring - db 등록시 한글 깨짐  (0) 2021.07.11