Skip site navigation (1) Skip section navigation (2)

RE: [INTERFACES] Re: (fwd) problems with Java

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Soumya Aithal <aithal(at)csee(dot)wvu(dot)edu>, Postgres Interfaces Mailing List <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: [INTERFACES] Re: (fwd) problems with Java
Date: 1999-03-30 09:38:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Two things (& the most common with jdbc):

1) JDBC & Postgres doesn't like null usernames nor passwords, so they
have to be set. If it's a trust, then the username has to be real, but
the password must contain something.

2) Has he set pg_hba.conf for the client, and is -i arg set on


Peter T Mount, IT Section
Anything I write here are my own views, and cannot be taken as the
official words of Maidstone Borough Council

-----Original Message-----
From: Thomas Lockhart [mailto:lockhart(at)alumni(dot)caltech(dot)edu]
Sent: Monday, March 29, 1999 5:01 PM
To: Soumya Aithal; Postgres Interfaces Mailing List
Subject: [INTERFACES] Re: (fwd) problems with Java

> I am a graduate research assistant at West Virginia University.
> I am trying to use Postgress on Linux.

Hi. I'm not familiar with the Java interface, and not familiar with
the rst package. I've reposted this to the "interfaces" mailing list,
which is the best place to ask for information.

Good luck.

                     - Tom

>   when I try to connect to the database   template1 using
>    psql template1
>   it connects
>   but when I try to connect using Java and the classes I ftped from
>   it says SQLException: Connection refused
>   this is in the constructor of Connection (line 102)
>  the command that I'm using to run the Test application is
>  java -Djdbc.drivers=rst.sql.Driver Test
> jdbc:rst:// "" ""
>  and I get
> ----
> java.sql.SQLException: Couldn't connect:
> Connection refused
>         at rst.sql.Connection.fatal(
>         at rst.sql.Connection.<init>(
>         at rst.sql.Driver.connect(
>         at java.sql.DriverManager.getConnection(
>         at
>         at Test.main(
> ----
> postmaster is running on on port 5432
> but it refuses connection?
> ---
> also the $PGHOST and $PGPORT environment variables were initially
> and psql template1 works
> but when I try to set them to the IP address or hostname (for PGHOST)
> and the port# of postmaster (for PGPORT)
> it doesn't work
> Connection refused.
> -----
>  Please advise me in this regard
>  I am currently stuck in the implementation of my project, and would
> greatly appreciate your help
>  thanks
> Soumya Aithal
> Graduate Research Assistant
> Dept. of Computer Science & Electrical Engineering.
> West Virginia University
> Morgantown, WV. 26506
> Res:
>  1064,VanVoorhis Road, Apt # K-226
>  Morgantown, WV 26505
>  Ph: (304)293-2349

pgsql-interfaces by date

Next:From: htDate: 1999-03-30 12:28:10
Subject: Help Delphi 2
Previous:From: Peter MountDate: 1999-03-30 08:55:17
Subject: Contacting me

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group