Error Document/Spring

[Spring] Could not get JDBC Connection 에러 해결 방법

JeongKyun 2022. 3. 19.
반응형

에러메세지

SEVERE: 경로 []의 컨텍스트 내의 서블릿 [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 java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 

 


 

에러 이미지

 


 

해결 방법


해당 에러가 뜨는 이유는 여러개가 있다지만 나는 접속 계정을 sys로만 해논 상태였는데

value = "sys" --> value="sys as sysdba"로 수정하니 해당 오류가 수정됐다.

 

역시 sys로 설정하는것은 좋지않은 것 같다. 그렇지만 나와 같이 sys로 설정하여 같은 오류를 겪는 사람도 있을거란 생각에 정리해둔다.

 

sys로 설정하는것을 최대한 지양하고 새로운 계정을 만들어서 사용하자!

댓글

💲 많이 본 글