Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezNOV-0008Gx-DX for pgsql-general@arkaria.postgresql.org; Fri, 23 Mar 2018 14:10:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ezNOT-00050x-Ev for pgsql-general@arkaria.postgresql.org; Fri, 23 Mar 2018 14:10:09 +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.89) (envelope-from ) id 1ezNOT-00050m-6Z for pgsql-general@lists.postgresql.org; Fri, 23 Mar 2018 14:10:09 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ezNOQ-0000FZ-Bz for pgsql-general@postgresql.org; Fri, 23 Mar 2018 14:10:08 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 97973BE20145 for ; Fri, 23 Mar 2018 07:10:05 -0700 (MST) Date: Fri, 23 Mar 2018 07:10:05 -0700 (MST) From: JCMS22 To: pgsql-general@postgresql.org Message-ID: <1521814205619-0.post@n3.nabble.com> In-Reply-To: References: Subject: Re: JDBC connectivity issue MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I am surprised this was not answered correct yet. I am in the same bucket as you and here is the problem. A quick look at the code and you find the answer. The BaseDataSource class (from which PGSimpleDataSource inherits) does NOT support failover addresses. The underlying driver used to parse the URL does it correctly: it returns url1,url2,url3 for URL and port1,port2,port3 for ports. However, the datasource interprets this as a single address so it tries to convert the "port1,port2,port3" string to an Integer....and it crashes. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html