I’m trying to develop new custom modules for JIRA instance.
For that I need a connection to an external database.
On the code view I have something like that:
private void initConnection()throws SQLException{
if(this.conn != null && this.conn.isClosed()){
this.conn.close();
}
String host = this.customConfig.getHost()+":"+this.customConfig.getPort();
String url = "jdbc:postgresql://"+host+"/"+this.customConfig.getDatabase();
Properties props = new Properties();
props.setProperty("user",this.customConfig.getUsername());
props.setProperty("password",this.customConfig.getPassword());
props.setProperty("ssl","true");
this.conn = DriverManager.getConnection(url, props);
}
Last line throw this error : java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/db-dev
Someone to help me ?