pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: (fwd) problems with Java
2+ messages / 2 participants
[nested] [flat]

* Re: (fwd) problems with Java
@ 1999-03-29 16:00  Thomas Lockhart <lockhart@alumni.caltech.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Lockhart @ 1999-03-29 16:00 UTC (permalink / raw)
  To: Soumya Aithal <aithal@csee.wvu.edu>; pgsql-interfaces

> 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
>     ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz
>   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://157.182.194.71:5432/template1 "" ""
> 
>  and I get
> 
> ----
> java.sql.SQLException: Couldn't connect: java.net.ConnectException:
> Connection refused
>         at rst.sql.Connection.fatal(Connection.java:614)
>         at rst.sql.Connection.<init>(Connection.java:102)
>         at rst.sql.Driver.connect(Driver.java:139)
>         at java.sql.DriverManager.getConnection(DriverManager.java:91)
>         at java.sql.DriverManager.getConnection(DriverManager.java:134)
>         at Test.main(Test.java:43)
> ----
> 
> postmaster is running on 157.182.194.71 on port 5432
> but it refuses connection?
> 
> ---
> also the $PGHOST and $PGPORT environment variables were initially empty
> 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* RE: [INTERFACES] Re: (fwd) problems with Java
@ 1999-03-30 09:38  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Mount @ 1999-03-30 09:38 UTC (permalink / raw)
  To: Thomas Lockhart <lockhart@alumni.caltech.edu>; Soumya Aithal <aithal@csee.wvu.edu>; 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
postmaster?

Peter

--
Peter T Mount, IT Section
petermount@it.maidstone.gov.uk
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@alumni.caltech.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
>     ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz
>   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://157.182.194.71:5432/template1 "" ""
> 
>  and I get
> 
> ----
> java.sql.SQLException: Couldn't connect: java.net.ConnectException:
> Connection refused
>         at rst.sql.Connection.fatal(Connection.java:614)
>         at rst.sql.Connection.<init>(Connection.java:102)
>         at rst.sql.Driver.connect(Driver.java:139)
>         at java.sql.DriverManager.getConnection(DriverManager.java:91)
>         at
java.sql.DriverManager.getConnection(DriverManager.java:134)
>         at Test.main(Test.java:43)
> ----
> 
> postmaster is running on 157.182.194.71 on port 5432
> but it refuses connection?
> 
> ---
> also the $PGHOST and $PGPORT environment variables were initially
empty
> 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-03-30 09:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-29 16:00 Re: (fwd) problems with Java Thomas Lockhart <lockhart@alumni.caltech.edu>
1999-03-30 09:38 RE: [INTERFACES] Re: (fwd) problems with Java Peter Mount <petermount@it.maidstone.gov.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox