Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a4ELF-0003xv-OK for pgsql-jdbc@arkaria.postgresql.org; Wed, 02 Dec 2015 20:49:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a4ELF-0000vc-6D for pgsql-jdbc@arkaria.postgresql.org; Wed, 02 Dec 2015 20:49:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a4EKi-0007Zp-0e for pgsql-jdbc@postgresql.org; Wed, 02 Dec 2015 20:49:00 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a4EKe-0004dE-DS for pgsql-jdbc@postgresql.org; Wed, 02 Dec 2015 20:48:59 +0000 Received: by wmec201 with SMTP id c201so272265667wme.0 for ; Wed, 02 Dec 2015 12:48:55 -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 :message-id:references:to; bh=2fdC7GUmHsKF7XY9/JGqxPX1xNe17xN//06w4cki/OM=; b=y+fn7S1Gw2FBxZEjs6Un04qz3LsvJHIsE8wpx+shOVEFzY9SjnsMN5GuvGVIXx/73H XhWndlxgDoiHlGTnrdIcSVpiDHfZ887ixS6UwVNgtiLT15lOOtCxTTxg58ChNEicNwXa iujhP0CdAmcJIeaEO8Kl+M8tXGdAeUXn5L7bXu2IEMz8UIc/EBxV5J56QhcpkV4UarBL AgltJOZdMDOfWalqlx1k8sTgdovctdg1YRZn/byNdY3DWrk5VCG0tBhiQqNMMYHWHGl6 mOnD1tIKG+ahj1dKmIZkK579YVq9+BOtQr3S0bQezdFKthcL8lM33+L2TUtNzVT1fWpa YzkQ== X-Received: by 10.28.140.211 with SMTP id o202mr8020785wmd.8.1449089335783; Wed, 02 Dec 2015 12:48:55 -0800 (PST) Received: from [192.168.1.66] (123.209.115.89.rev.vodafone.pt. [89.115.209.123]) by smtp.gmail.com with ESMTPSA id he3sm4399898wjc.25.2015.12.02.12.48.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Dec 2015 12:48:54 -0800 (PST) Content-Type: multipart/alternative; boundary="Apple-Mail=_A732EA8B-0DBB-49BE-8DC9-504BCC7FDF6A" Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: user can't access own database after creation From: Nuno Zimas In-Reply-To: Date: Wed, 2 Dec 2015 20:48:53 +0000 Cc: John R Pierce , List Message-Id: <1F7C5018-AB78-40D0-989F-330B81528B2C@gmail.com> References: <25B91293-CCF8-42D9-B4ED-19DF36AA881C@gmail.com> <565F4D26.1050501@hogranch.com> To: Dave Cramer X-Mailer: Apple Mail (2.3096.5) 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 --Apple-Mail=_A732EA8B-0DBB-49BE-8DC9-504BCC7FDF6A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Dave, I=E2=80=99m getting an error. root@aida2next /u/2next# javac TestUrl.java=20 TestUrl.java:1: error: ';' expected import java.sql.Connection ^ 1 error > 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:postgresql://yourhost","youruse= r","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 > 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=E2=80=99m not a java programmer and it=E2=80=99s been hell on rather = to compile even the simplest java source file due to dependency issues. >=20 >>=20 >> davec@postgresintl.com >> www.postgresintl.com >> 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 = explicitly 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=E2=80=99ve = installed on windows 10. >> So far, the only visible difference I found is in the values for = LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and = English_United 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 = database? >>=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 --Apple-Mail=_A732EA8B-0DBB-49BE-8DC9-504BCC7FDF6A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Hi Dave,

I=E2=80=99m getting an error.

root@aida2next = /u/2next# javac TestUrl.java 
TestUrl.java:1: error: ';' = expected
import = java.sql.Connection
                =           ^
1 error



<= /div>
On = 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:

this isn't compiled, but it has no dependencies to compile = and only one to run

import java.sql.Connection

/**
* Created = by davec on 2014-03-28.
*/
class TestUrl
{
public static = void main(String []args)
{
= Connection con =3D java.sql.DriverManager.getConnection("jdbc:postgresql://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

change the names above to suit


On 2 December 2015 at 15:35, = Nuno Zimas <nzimas@gmail.com> wrote:

On 2 Dec 2015, at 20:18, Dave Cramer <pg@fastcrypt.com> wrote:

Can you try a very simple JDBC = program to see if you can connect ?

Dave Cramer

Could you please = suggest one already compiled?
I=E2=80=99m not a = java programmer and it=E2=80=99s been hell on rather to compile even the = simplest java source file due to dependency issues.


On 2 December 2015 at 14:57, = John R Pierce <pierce@hogranch.com> 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 = explicitly 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=E2=80=99ve installed = on windows 10.
So far, the only visible difference I found is in the values for = LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and = English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.

can you connect using psql on the windows system to the ubuntu hosted = database?



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc




= --Apple-Mail=_A732EA8B-0DBB-49BE-8DC9-504BCC7FDF6A--