Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 58ECB1336B42 for ; Fri, 10 Dec 2010 03:27:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 27588-01 for ; Fri, 10 Dec 2010 07:27:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from intern.proventis.net (intern.proventis.net [85.182.161.50]) by mail.postgresql.org (Postfix) with ESMTP id 98F08133655C for ; Fri, 10 Dec 2010 03:27:31 -0400 (AST) Received: from mail.proventis.net (unknown [192.168.22.239]) by intern.proventis.net (Postfix) with ESMTP id 49E0A2C1A2; Fri, 10 Dec 2010 08:27:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.proventis.net (Postfix) with ESMTP id C26EFC583C; Fri, 10 Dec 2010 08:27:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.proventis.net Received: from mail.proventis.net ([127.0.0.1]) by localhost (mail.proventis.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p7CTifB6fPv9; Fri, 10 Dec 2010 08:27:12 +0100 (CET) Received: from [192.168.22.130] (tmarkus.proventis.net [192.168.22.130]) by mail.proventis.net (Postfix) with ESMTP id 65FEB68E64; Fri, 10 Dec 2010 08:27:12 +0100 (CET) Message-ID: <4D01D676.6080209@proventis.net> Date: Fri, 10 Dec 2010 08:27:50 +0100 From: Thomas Markus Organization: proventis GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.12) Gecko/20101026 SUSE/3.1.6 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.6 MIME-Version: 1.0 To: Rob Stone CC: pgsql-jdbc@postgresql.org Subject: Re: Connection Problem References: <1291728544.3489.28.camel@localhost> In-Reply-To: <1291728544.3489.28.camel@localhost> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/50 X-Sequence-Number: 21288 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 > > >