개발/백앤드

No suitable driver found for jdbc:postgresql://localhost:5432/database 에러 해결

Oreorobin 2022. 8. 31. 09:52

인텔리제이 Tomcat 서버에서 postgresql 사용 시 org.postgresql.Driver를 찾지 못하는 문제 발생  

해결 Tomcat->lib->postgresql jdbc driver 저장.

*(Driver intallation link : https://jdbc.postgresql.org/download.html)

 

사용 환경: intellij, Maven, JavaEE-webapp

라이브러리 : Tomcat, Servlet(4.0.1), Postgresql(42.4.1)

pom.xml 의존성 추가 상태 - 해결 후 기존 postgresql 의존성은 필요없다.

참고 페이지 : https://stackoverflow.com/questions/19753004/classnotfoundexception-org-postgresql-driver-with-connection-pooling-example