File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Trouble Connecting to MSSQL Server 2005 (Struts+Hibernate): TCP/IP Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Trouble Connecting to MSSQL Server 2005 (Struts+Hibernate): TCP/IP Error " Watch "Trouble Connecting to MSSQL Server 2005 (Struts+Hibernate): TCP/IP Error " New topic
Author

Trouble Connecting to MSSQL Server 2005 (Struts+Hibernate): TCP/IP Error

Eric Sidarta
Greenhorn

Joined: Aug 26, 2007
Posts: 1
Dear all,

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?

Anyone has any solution? Thanks in advance
 
jQuery in Action, 2nd edition
 
subject: Trouble Connecting to MSSQL Server 2005 (Struts+Hibernate): TCP/IP Error