java.sql.SQLException: Connection failed: java.net.ConnectException: Connection refused

Oracle Community | 807554 | 2 decades ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Bug in java.sql or have I just got it wrong?

    Oracle Community | 2 decades ago | 807554
    java.sql.SQLException: Connection failed: java.net.ConnectException: Connection refused

    Root Cause Analysis

    1. java.sql.SQLException

      Connection failed: java.net.ConnectException: Connection refused

      at postgresql.Connection.<init>()
    2. postgresql
      Driver.connect
      1. postgresql.Connection.<init>(Connection.java:190)
      2. postgresql.Driver.connect(Driver.java:87)
      2 frames
    3. Java RT
      DriverManager.getConnection
      1. java.sql.DriverManager.getConnection(DriverManager.java:91)
      2. java.sql.DriverManager.getConnection(DriverManager.java:134)
      2 frames
    4. example
      basic.main
      1. example.basic.<init>(basic.java:32)
      2. example.basic.main(basic.java:166)
      2 frames