From: dmp <danap@ttc-cmc.net>
To: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: bug - connection problem with jdk 1.7 ?
Date: Thu, 27 Mar 2014 11:03:50 -0600
Message-ID: <533459F6.8080509@ttc-cmc.net> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
> (I send this e-mail again, because I hadn't subscribed me to the mailing list)
>
> Hello,
>
> I already presented on the devshed forum a connection problem to postgresql with the jdbc jar file postgresql-9.3-1100.jdbc41.jar. Nobody answered me.
>
> Until recently I thought that the origin of the problem was maybe Eclipse, but now I have tested the same code with a recent version of another development tool, Intellij IDEA, and the problem is still the same.
>
> That’s why I begin to think that the postgresql-9.3-1100.jdbc41.jar file doesn’t function correctly with the jdk 1.7 (version 51.0), moreover because the same code worked very well with jdk 1.6, postgresql 9.0 and postgresql-9.0-801.jdbc4.jar.
>
> So, now I repeat the explanation of the jdbc connection problem that I gave on the devshed forum:
>
> Recently I bought a new computer and installed a running project with upgraded versions of windows (windows 7, 64 bit), eclipse (4.3.1), java (jdk 1.7 : 51.0), postgresql (9.3) and jdbc (postgresql-9.3-1100.jdbc41.jar).
>
> On the older versions the programs ran without any problem, but now there is an exception in the following code:
>
> public static final String DBURL = "jdbc:postgresql:MR";
> public static final String DBUSER = "postgres";
>
> . . .
>
> public static Connection createConnection () throws SQLException {
> Properties props = new Properties();
> props.setProperty("user",DBUSER);
> return DriverManager.getConnection(DBURL, props);
> }
dbConnection = DriverManager.getConnection(connectionURLString, connectProperties);
Connection URL: jdbc:postgresql://127.0.0.1:5432/key_tables
What is "jdbc:postgresql:MR"? Is this a valid URL string?
Above works fine with eclipse, jdk 1.7_45, 9.3-1101.jdbc41.jar
Test of your URL:
Connection Parameters: jdbc:postgresql:key_tables?user=danap&password=&loglevel=0
ClassNotFoundExceptionjava.lang.ClassNotFoundException: org.postgresql.Driver
SQLExeceptionjava.sql.SQLException: No suitable driver found for
jdbc:postgresql:key_tables?user=danap&password=&loglevel=0
Which would result in NULL being returned as you have indicated.
danap.
>
> . . .
>
> ~
> ~
> ~
>
> Tim
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
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: danap@ttc-cmc.net
Subject: Re: bug - connection problem with jdk 1.7 ?
In-Reply-To: <533459F6.8080509@ttc-cmc.net>
References: <533459F6.8080509@ttc-cmc.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