본문 바로가기
DB/Oracle

JAVA Oracle DB Exception 정리

by avvin 2019. 7. 23.

* 드라이브 이름을 찾지 못했을 때

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver1

 

* db url이 올바르지 않을 때

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
The Connection descriptor used by the client was:

* db id나 pw가 틀릴 때

java.sql.SQLException: ORA-01017: invalid username/password; logon denied

 

* ?개수만큼 바인딩을 해주지 않았을 때

​java.sql.SQLException: 인덱스에서 누락된 IN 또는 OUT 매개변수::

 

* ?개수보다 추가해서 바인딩하려고 할 때

java.sql.SQLException: 부적합한 열 인덱스 

 

 

DB에서는 주로 SQL이 틀려서 실행이 안되는 경우가 많으므로

웹 콘솔 등에서 값을 실제 값으로 넣어준 후 되는지 확인한 후 복사해서 사용하는 것이 좋다!


출처 : https://m.blog.naver.com/PostView.nhn?blogId=seongih7&logNo=220156224784&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F