Getting the following error - No suitable driver found for jdbc:postgresql://localhost: 5432/testDBMS

前端 未结 4 1023
野趣味
野趣味 2021-01-29 13:07

I get back an error indicating java.sql.SQLException: No suitable driver found for
jdbc:postgresql://localhost: 5432/testDBMS

import java.sql.*;
impo         


        
4条回答
  •  失恋的感觉
    2021-01-29 13:48

    Did you not load the driver in your code? Either define the jdbc.drivers property setting it to org.postgresql.Driver or add Class.forName("org.postgresql.Driver") to your code.

提交回复
热议问题