No suitable driver found for jdbc:postgresql

No suitable driver found for jdbc:postgresql

book

Article ID: KB0083289

calendar_today

Updated On:

Products Versions
TIBCO Administrator 5.10

Description

Create domain is giving the error:

java.lang.Exception: java.sql.SQLException: No suitable driver found for jdbc:postgresql://pdsnee.db.enel:5432:tedtest27042017db

Issue/Introduction

When trying to connect to the PostgreSQL, getting the error: java.lang.Exception: java.sql.SQLException: No suitable driver found for jdbc:postgresql://pdsnee.db.enel:5432:tedtest27042017db

Environment

Linux

Resolution

In Postgres DB, the JDBC connection URL is taking the following form:

 jdbc:postgresql:database
 jdbc:postgresql://host/database
 jdbc:postgresql://host:port/database

In above example JDBC URL is incorrect we have to remove ":" before the port see below:
======================
jdbc:postgresql://pdsnee.db.enel:5432:tedtest27042017db  ,

correct URL is  replace ":" (semicolon) with  "/"  (front slash).

jdbc:postgresql://pdsnee.db.enel:5432/tedtest27042017db

======================