pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Markus <t.markus@proventis.net>
To: Rob Stone <robstone@mira.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Connection Problem
Date: Fri, 10 Dec 2010 08:27:50 +0100
Message-ID: <4D01D676.6080209@proventis.net> (raw)
In-Reply-To: <1291728544.3489.28.camel@localhost>
References: <1291728544.3489.28.camel@localhost>

Hi,

maybe this is your problem 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056

try to start your java class with -Djava.net.preferIPv4Stack=true

regards
Thomas

Am 07.12.2010 14:29, schrieb Rob Stone:
> Good morning,
>
> I don't know if I've done something really stupid or if I've stumbled on
> a bug.
>
> Run Debian on my laptop, version 2.6.32-3-686. Downloaded the PostgreSQL
> 9.0.1 source and compiled it following all the instructions. Downloaded
> the PGAdminIII 1.12 source plus heaps of .cpp files, compiled it. I can
> access the 9.0 database via psql or PGAdmin, view the database I
> created, display data in tables. (Not much to display at present but
> some rows exists in a couple of tables.)
>
> Downloaded the JDBC driver postgresql-9.0-801.jdbc4.jar, put it in my
> CLASSPATH, etc.
>
> Downloaded the latest version of ExecuteQuery, declared the new driver,
> created a connection to my 9.0 database using the new driver but unable
> to connect to the database. See stack trace attached.
>
> Postmaster is started with the -i option which I believe is the same as
> saying "listen_addresses='*'".
>
> Using jdk1.6.
>
> Wrote a mickey mouse java class (testdbconn) to see if I could access
> the database and read data from a table that has two rows. See attached.
> When it runs it displays the same SQL error code as ExecuteQuery --
> 08001 -- which is the "can't connect error".
>
> The developer of ExecuteQuery is a former colleague of mine and a
> friend. We have been sending each other e-mails about this trying to
> suss out the problem.
>
> Obviously, I have installed something incorrectly OR there is something
> awry with java making the connection. psql and PGAdmin talk directly to
> the database without using a JDBC driver. Seeing as they are both
> functioning normally, what have I done to cause java to pull connect
> errors???
>
> Any advice will be greatly appreciated.
>
> Cheers,
> Rob
>
>
>




view thread (24+ messages)  latest in thread

Message-ID: <4D01D676.6080209@proventis.net>
Permalink:  ../4D01D676.6080209@proventis.net/
Also on:    postgresql.org/message-id/4D01D676.6080209@proventis.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: t.markus@proventis.net, robstone@mira.net
  Subject: Re: Connection Problem
  In-Reply-To: <4D01D676.6080209@proventis.net>
  References: <1291728544.3489.28.camel@localhost> <4D01D676.6080209@proventis.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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