Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDlo-00074M-E2 for pgsql-jdbc@arkaria.postgresql.org; Thu, 27 Mar 2014 17:07:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WTDln-0008IM-U2 for pgsql-jdbc@arkaria.postgresql.org; Thu, 27 Mar 2014 17:07:11 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDlm-0008IF-Th for pgsql-jdbc@postgresql.org; Thu, 27 Mar 2014 17:07:11 +0000 Received: from outbound.vnet-inc.com ([216.146.104.103]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDlk-0003zb-Ai for pgsql-jdbc@postgresql.org; Thu, 27 Mar 2014 17:07:10 +0000 Received: from [192.168.157.132] (unknown [65.19.243.151]) by outbound.vnet-inc.com (Postfix) with ESMTP id A08BF7CDC for ; Thu, 27 Mar 2014 11:05:40 -0600 (MDT) Message-ID: <533459F6.8080509@ttc-cmc.net> Date: Thu, 27 Mar 2014 11:03:50 -0600 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8 MIME-Version: 1.0 To: PostgreSQL JDBC Subject: Re: bug - connection problem with jdk 1.7 ? Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) 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 > (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