티스토리 뷰
[Spring] DB 연동 500 서버 오류 - [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException : nested exception is org.apache.ibatis.exceptions.PersistenceException:
Chikaka 2021. 3. 19. 15:25spring 서버를 돌렸는데

SEVERE: 경로 [/myapp]의 컨텍스트 내의 서블릿 [appServlet]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException : nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException:
Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: The authentication type 10 is not supported.
등등 쭉 에러 메시지가 떴는데요,,
아무리 찾아봐도 오타 때문이다, 뭐 namespace 를 잘 적었는지 봐라,
mapper id가 맞는지 봐라 등등 나와는 맞지 않는 해결책 뿐이었다.
분명 잘 적었는데,,
결국 찾아낸 나의 오타 부분은!!
PostgreSQL 버전 부분이었다.
블로그 코드를 복붙하다보니,, 생긴 웃픈 문제였는데
pom.xml에서 적어준 PostgreSQL dependency에서 버전을 9.4.1209.jre6로 설정 해놨었다.
근데 찾아보니
you have to check your maven dependency if you are using postgresql 9.1+ then your dependency should be like above -> <version>42.2.18</version>
라는 글을 보았다.
버전이 9.1 이상이면 버전을 42.2.18로 적어줘야한다는 것이었다. 일단 내가 13.2 버전이니까
바로 적용해보았더니!!

드디어 Hello world를 보는구나ㅠㅠ
이틀만에 보는...ㅋㅋㅋㅋ
아무리 해봐도 안될 땐 이런 방법도 적용해보면 좋을것같다.
Unable to connect to Postgress DB due to the authentication type 10 is not supported
I have recently tried my hands on Postgres. Installed it on local(PostgreSQL 13.0). Created a maven project and used Spring Data JPA, works just fine. Whereas when I tried using Gradle project, I a...
stackoverflow.com
'개발 > Spring' 카테고리의 다른 글
| [Spring] 웹에서 한글 깨짐 해결 (0) | 2021.03.22 |
|---|---|
| [Spring] spring postgresql DB 연동 (0) | 2021.03.19 |
| 이클립스 spring 서버 Ansi-console 경고창 (0) | 2021.03.19 |
| 요청된 리소스 [/]은(는) 가용하지 않습니다. - 이클립스 톰캣 연동 에러 (0) | 2021.03.18 |
| 이클립스에서 xml 파일에서 node와 content 만 보일 때 (0) | 2021.03.18 |
