Trouble Connecting to MSSQL Server 2005 (Struts+Hibernate): TCP/IP Error
posted 9 years ago
I just had a problem connecting to MS-SQL Server 2005. My application is based on Struts and connecting to database using Hibernate 2.1.6. My conection use SQLJDBC 1.1.1501 It is run under WINDOWS 2000 Advanced Server SP4
However, the application very good was working previously (never had problem like this)...then several days ago this thing happened.
"com.microsoft.sqlserver.jdbc.SQLServerException: TCP/IP connection failed to host:localhost java.net.ConnectException"
It has something that said "connection time out"
My Sql Server TCP/IP enabled and port 1433
There is another problem here. Because I cant connect 1433.I tried this command.
telnet localhost 1433 .It is failed.
I used netstat -an
it says that the port 1433 is in LISTENING mode. My application works OK by the way, it just CANT CONNECT with the Database.
I tried using the exact same installed application on another computer, connecting to the database, but it was working fine(!)
So where exactly the problem occur? the database or the application?