Coldfusion with PostgreSQL – Timeout issue when setting up CF Data source

Upon trying to connect to a remote POSTGRESQL database server — which I can both PING fine and connect to using the Windows POSTGRESQL odbc 32 bit drivers —

you get this error

Connection verification failed for data source: mytest_post
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish connection

==

Here is the easy fix.  (presumtion of CF 10)

  1. make sure you apply the most current CF hotfix
    1. easy process – read this blog post
  2.  for an “out-of-the-box” setup, (noting that CF 10 is running on JRE 6.x), download the JDBC driver version 4.0 (which is for JRE 6.x)  here
  3.  put that JAR file in the following directory
    1. C:\ColdFusion10\cfusion\lib
    2. remove the old POSTGRESQL JAR file postgresql-9.3-1101.jdbc41.jar
    3. restart the CF services
  4. Go setup the postgreSQL connection and verify it.  Should now give you an “OK”

This was a NIGHTMARE to sort out.  I am hoping this can help someone!

 

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.