English

Error: Java Database Connectivity (JDBC) Connection Refused error

Error Message

In a SQL Server 2005 environment, during deployment of the GPT application, the Tomcat logs report the following TCP/IP connection error:

"com.esri.gpt.framework.sql.DatabaseReference testConnection
SEVERE: Connection test failed.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(The TCP/IP connection to the host has failed.
java.net.ConnectException: Connection refused: connect)"

Cause

This error occurs when TCP/IP connections are not enabled in SQL Server 2005.

Solution or Workaround

TCP/IP connections must be enabled in the SQL Server Configuration Manager.

  1. Open the SQL Server Configuration Manager: Start Menu > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Configuration Manager.
  2. Expand the SQL Server 2005 Network Configuration Node.
  3. Select the 'Protocols for MSSQLSERVER' child node.
  4. In the right-hand pane, there should be several protocols listed, one of which is TCP/IP.
  5. Check the value of the Status column for TCP/IP. It should be set to 'Enabled'.
  6. If it is not, right-click anywhere in the TCP/IP row.
  7. From the context menu, select 'Enable'.
  8. Click OK on the dialog box.
  9. Close the SQL Server Configuration Manager.
  10. Open the Windows Services panel and restart the MSSQLServer service. Restart Tomcat.