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