Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a4EM1-00042O-HF for pgsql-jdbc@arkaria.postgresql.org; Wed, 02 Dec 2015 20:50:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a4EM1-0002Nn-3z for pgsql-jdbc@arkaria.postgresql.org; Wed, 02 Dec 2015 20:50:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a4EM0-0002JU-Er for pgsql-jdbc@postgresql.org; Wed, 02 Dec 2015 20:50:20 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a4ELx-0001rV-Gy for pgsql-jdbc@postgresql.org; Wed, 02 Dec 2015 20:50:19 +0000 Received: by pabfh17 with SMTP id fh17so52325484pab.0 for ; Wed, 02 Dec 2015 12:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sxb1CzUsnT0u8T20i+/kL2J38XcfStQm7Pb4kkZ48OU=; b=HA6EIeo5yPJ9C0mxKnLcLxxpm3cBXqBCm5bBYMx8tQTSxOLFg9/zm8VcogFK/3iNGI TphAVKi9fmncZdRl6ruB35Yge2vByyTC2zQIAPDZbVe7afc4dnMi7WRSOY2f/OmZB2VV vwIgVZs8HVwxxaTa5/2IjO/LzqRFuV3CG2Lv3BW77X+Av0+AICDp23Z7ldKwMFyEATnp F3Qo2zo7s+kvZtVjPrQr216P8toJvyRZitPzOe4wWsfKIEgddzRHpnugUECCQ3ZuxFY3 wA30zZknYZ6F7GvARKdI+r+MoipwQiJcVxTB7qErsQmEJKchSDzrIt731rcQA+Ea9MXB pOqg== X-Received: by 10.66.162.38 with SMTP id xx6mr7747385pab.57.1449089416159; Wed, 02 Dec 2015 12:50:16 -0800 (PST) Received: from [10.10.21.145] ([199.16.144.7]) by smtp.gmail.com with ESMTPSA id g73sm6103333pfd.81.2015.12.02.12.50.15 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Dec 2015 12:50:15 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: user can't access own database after creation From: Steven Schlansker In-Reply-To: <1F7C5018-AB78-40D0-989F-330B81528B2C@gmail.com> Date: Wed, 2 Dec 2015 12:50:13 -0800 Cc: Dave Cramer , John R Pierce , List Content-Transfer-Encoding: quoted-printable Message-Id: References: <25B91293-CCF8-42D9-B4ED-19DF36AA881C@gmail.com> <565F4D26.1050501@hogranch.com> <1F7C5018-AB78-40D0-989F-330B81528B2C@gmail.com> To: Nuno Zimas X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org That's easily fixed by adding the missing ';' just as the error indicates :) On Dec 2, 2015, at 12:48 PM, Nuno Zimas wrote: >=20 > Hi Dave, >=20 > I=92m getting an error. >=20 > root@aida2next /u/2next# javac TestUrl.java=20 > TestUrl.java:1: error: ';' expected > import java.sql.Connection > ^ > 1 error >=20 >=20 >=20 >> On 2 Dec 2015, at 20:39, Dave Cramer wrote: >>=20 >> this isn't compiled, but it has no dependencies to compile and only one = to run >>=20 >> import java.sql.Connection >>=20 >> /** >> * Created by davec on 2014-03-28. >> */ >> class TestUrl >> { >> public static void main(String []args) >> { >> Connection con =3D java.sql.DriverManager.getConnection("jdbc:postgr= esql://yourhost","youruser","password"); >> con.createStatement().execute("select 1"); >> } >> } >> save it in a file called TestUrl.java >> compile it with javac TestUrl.java >> run it with java -cp postgresql.jar:./ TestUrl >>=20 >> change the names above to suit >>=20 >> Dave Cramer >>=20 >> davec@postgresintl.com >> www.postgresintl.com >>=20 >> On 2 December 2015 at 15:35, Nuno Zimas wrote: >>=20 >>> On 2 Dec 2015, at 20:18, Dave Cramer wrote: >>>=20 >>> Can you try a very simple JDBC program to see if you can connect ? >>>=20 >>> Dave Cramer >>=20 >> Could you please suggest one already compiled? >> I=92m not a java programmer and it=92s been hell on rather to compile ev= en the simplest java source file due to dependency issues. >>=20 >>>=20 >>> davec@postgresintl.com >>> www.postgresintl.com >>>=20 >>> On 2 December 2015 at 14:57, John R Pierce wrote: >>> On 12/2/2015 11:55 AM, Nuno Zimas wrote: >>> psql always connects successfully no matter what. >>> As for JDBC, we get the same results with or without ssl=3Dtrue explici= tly appended to the URL. >>> What truly baffles me is that ye exact same java application works with= no hiccups against a quasi-vanilla pgsql backend i=92ve installed on windo= ws 10. >>> So far, the only visible difference I found is in the values for LC_COL= LATE and LC_TYPE, which is V on the remote pgsql instances and English_Unit= ed States.1252 on the local pgsql instance. >>> Not sure how tis would affect accessing the DBs, though. >>>=20 >>> can you connect using psql on the windows system to the ubuntu hosted d= atabase? >>>=20 >>>=20 >>>=20 >>> --=20 >>> john r pierce, recycling bits in santa cruz >>>=20 >>>=20 >>>=20 >>> --=20 >>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) >>> To make changes to your subscription: >>> http://www.postgresql.org/mailpref/pgsql-jdbc >>>=20 >>=20 >>=20 >=20 --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc