• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQL Server 2000 connectivity error

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am using SQL Server2005 for my web application development. I am using the driver "com.microsoft.jdbc.sqlserver.SQLServerDriver" to connect the database. I am able to connect the database and also tested it on dev environment.
I need to deploy this on a test machine where the database is SQL Server2000. When I deploy this application on that test machine i am getting the connectivity error. When I change the driver to "com.microsoft.sqlserver.jdbc.SQLServerDriver" for test machine, still i am getting errors. The errors are as follows.
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the ho
st localhost, port 1433 has failed. Error: "connect timed out. Verify the connec
tion properties, check that an instance of SQL Server is running on the host and
accepting TCP/IP connections at the port, and that no firewall is blocking TCP
connections to the port.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(S
QLServerException.java:170)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1049)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:833)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:716)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:841)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.logica.catalogueTool.db.CatalogueDAOImpl.getConnection(Unknown So
urce)
at com.logica.catalogueTool.db.CatalogueDAOImpl.getSuppliers(Unknown Sou
rce)
at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:103)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
42)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Unknown Source)

What could be the reason for this error? Could you please help me out to trace out this?
Thanks in advance.
Best Regards
Babu
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried checking all the things the error message tells you? e.g. :
  • Verify the connection properties,
  • check that an instance of SQL Server is running on the host
  • and accepting TCP/IP connections at the port,
  • and that no firewall is blocking TCP connections to the port.
  •  
    BabuRajendraPrasad Tavva
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Paul,
    Thanks for your reply.
    I have checked the connection properties. There is another application which uses the SQL server database and hence the database instance is always running on the host machine. The port is also enabled.
    Only the thing I have to check is the firewall block. I am checking for that.
    Do you mean to say that all the mentioned four points are ok will not result this error?
    Regards
    Babu
     
    Paul Sturrock
    Bartender
    Posts: 10336
    Hibernate Eclipse IDE Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    There is a good chance that it should be OK.
     
    BabuRajendraPrasad Tavva
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Paul,

    I have tested the firewall thing. The port is enabled and i am able to connect to the database.
    Thanks a lot for your response and help.

    Best regards,
    Babu
     
    Wink, wink, nudge, nudge, say no more, it's a tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic