From: | Michael Stephenson <mstephenson(at)tirin(dot)openworld(dot)co(dot)uk> |
---|---|
To: | tony <tony(at)uickarate(dot)com> |
Cc: | pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: JDBC prob. Continued |
Date: | 2000-11-16 17:37:32 |
Message-ID: | Pine.LNX.4.10.10011161730190.12023-100000@tirin.openworld.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Thu, 16 Nov 2000, tony wrote:
> I'm using 7.0.
> Greg told me that SQLException is thrown by
> getConnection();
> so I've changed by getConnection to
> DriverManager.getConnection("jdbc:postgresql:database_name", "postgres",
> "password");
> and the error changed to something like this:
> SQLException: Connection refused. Check that th ehostname and port is
> correct, and
> tha thte postmaster is runing with the -i flag, which enables TCP/IP
> networking.
>
> Any ideas??
From reading the error message I'd suggest, either you have the hostname
and port incorrect, correct use is:
DriverManager.getConnection(
"jdbc:postgresql://[host]:[port]/[db_name]",
"[username]", "[password]");
Or you're not running postmaster with the -i flag, I use:
postmaster -i -p [port] -D [data directory]
If it's neither of those, then I'm sorry for being patronising.
Hope this helps,
Michael Stephenson
From | Date | Subject | |
---|---|---|---|
Next Message | Paul M. Aoki | 2000-11-16 20:52:43 | Re: no meaningful way to determine fe or be version? |
Previous Message | Thomas Lockhart | 2000-11-16 17:06:10 | Re: [HACKERS] Re: DBD::Pg installation seems to fail with 7.1 libs |