I'm trying to setup my ColdFusion instance to use jTDS for a datasource instead of the built in driver from Macromedia, but when I save the datasource I get the following error:
Connection verification failed for data source: rxdsn
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish connection
If I create the same datasource with the built in driver I can connect just fine.
I'm doing all of this on ColdFusion 9 Standard on Windows 2008 R2. Here's what I've done so far:
- Drop jtds-1.3.0.jar and jcifs-1.3.17.jar into C:\ColdFusion9\lib
- Restart ColdFusion (checked ColdFusion sys info page and verified that both are in CF Server Java Class Path)
- Created a new datasource with the following information:
- CF Data Source Name: rxdsn
- JDBC URL: jdbc:jtds:sqlserver://slavedb:1433/CFOnward1
- Driver Class: net.sourceforge.jtds.jdbc.Driver
- Driver Name: jTDS
- Username: coldfusion
- Password: *
After I save I get the error. Again, I used the same information (server, database, username and password) with the built in driver and I can successfully connect.
My environment is as follows:
Sever 1:
- Windows 2008 R2
- IIS 7.5
- ColdFusion 9 Standard
Server 2:
- Windows 2008 R2
- Microsoft SQL Server 2008 R2 Standard
jdbc:jtds:sqlserver://slavedb:1433/CFOnward1;user=coldfusion;password=********
You may also need to specify the SQL server instance in the URL. See reference here – Miguel-Fnetstat -a
at a command prompt and look for your database server then verify the port. In my mind the error being reported means that it is unable to reach the database server or the connection is being denied for some reason. – Miguel-FwriteDump(createObject('java', 'net.sourceforge.jtds.jdbc.Driver'));
The result was nothing. The page stopped processing and nothing was outputted. – Dave Long