pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Where can I get documentation on the using the JDBC interface?
3+ messages / 3 participants
[nested] [flat]

* Where can I get documentation on the using the JDBC interface?
@ 1998-10-19 16:44  Phil McGlauchlin <pmcglauchlin@gr.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Phil McGlauchlin @ 1998-10-19 16:44 UTC (permalink / raw)
  To: pgsql-interfaces

Hi,

I am trying to get the jdbc interface to work but I keep getting a
SQLException "connection refused".

I am using a simple Java application that does a "select* from member" on a
table named "member" in the database "Membership". I am passing the
following url: "jdbc:postgresql:membership?<username>&<passwd>"

Is this a userid/password problem? I first tried the url without a user,
then with "postgres" and no password, and finally with a new user I created.
I used the createuser command to create the user but I couldn't figure out
how to set the password.

I have spent a while searching the web site and the Postgresql documentation
for answers but I can't find much documentation on the jdbc driver. Where do
I go to get it?

Any help is greatly appreciated.

Thanks, Phil.

--
Phil McGlauchlin, SCJP              847-330-4294 (direct)
Greenbrier & Russel Inc.            847-706-4020 (fax)
1450 East American Lane Suite 1700  http://www.gr.com
Schaumburg, IL 60173                pmcglauchlin@gr.com
---------------------------------------------------------




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

* Re: [INTERFACES] Where can I get documentation on the using the JDBC interface?
@ 1998-10-19 22:01  Peter T Mount <peter@retep.org.uk>
  parent: Phil McGlauchlin <pmcglauchlin@gr.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Peter T Mount @ 1998-10-19 22:01 UTC (permalink / raw)
  To: Phil McGlauchlin <pmcglauchlin@gr.com>; +Cc: pgsql-interfaces

On Mon, 19 Oct 1998, Phil McGlauchlin wrote:

> Hi,
> 
> I am trying to get the jdbc interface to work but I keep getting a
> SQLException "connection refused".

Connection refused means there is nothing listening for the connection.
Check you have started the postmaster with -i

> I am using a simple Java application that does a "select* from member" on a
> table named "member" in the database "Membership". I am passing the
> following url: "jdbc:postgresql:membership?<username>&<passwd>"
> 
> Is this a userid/password problem? I first tried the url without a user,
> then with "postgres" and no password, and finally with a new user I created.
> I used the createuser command to create the user but I couldn't figure out
> how to set the password.

No, the exception would read differently. It's definitely caused by no
tcp/ip socket being available.

tip: check that pg_hba.conf is also configured correctly.

> I have spent a while searching the web site and the Postgresql documentation
> for answers but I can't find much documentation on the jdbc driver. Where do
> I go to get it?

http://www.retep.org.uk/postgres/ has my FAQ and legacy drivers.

There's a lot of documentation being prepared for 6.4

Peter

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf




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

* Re: [INTERFACES] Where can I get documentation on the using the JDBC interface?
@ 1998-10-21 11:12  John Reilly <jr@broadcom.ie>
  parent: Phil McGlauchlin <pmcglauchlin@gr.com>
  1 sibling, 0 replies; 3+ messages in thread

From: John Reilly @ 1998-10-21 11:12 UTC (permalink / raw)
  To: pmcglauchlin@gr.com; +Cc: pgsql-interfaces

Phil McGlauchlin wrote:
> I am trying to get the jdbc interface to work but I keep getting a
> SQLException "connection refused".

First of all, make sure you are running the postmaster with the "-i" option.

> Is this a userid/password problem? I first tried the url without a user,
> then with "postgres" and no password, and finally with a new user I created.
> I used the createuser command to create the user but I couldn't figure out
> how to set the password.

edit the pg_hba.conf to set the hosts that are allowed to access the db

To change user details like the password, use psql.  type "\h alter user"
for syntax details

John

-- 
-----------------------------------------------------------------------------
John Reilly,			|  Phone: +353 1 6046006
Broadcom Eireann Research Ltd.,	|  Fax:   +353 1 6761532
Kestrel House,			|  Email: jr@broadcom.ie
Clanwilliam Place,		|
Dublin 2,  Ireland		|
-----------------------------------------------------------------------------



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


end of thread, other threads:[~1998-10-21 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-10-19 16:44 Where can I get documentation on the using the JDBC interface? Phil McGlauchlin <pmcglauchlin@gr.com>
1998-10-19 22:01 ` Peter T Mount <peter@retep.org.uk>
1998-10-21 11:12 ` John Reilly <jr@broadcom.ie>

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