Javaweb a series of errors that occur when you link a project to SQL Server 2008r2

Source: Internet
Author: User

For a long time did not make Java, play eclipse, recently because of a small reason, to participate in a game, have to javaweb things picked up again, so unfamiliar, coupled with the previous link database is Oracle, and now the company's computer is just installed SQL Server 2008R2, so try to develop the project link to SQL Server 2008R2. From yesterday night, to this evening, finally sort out a series of problems, when the page shows the Flash, good fun. Life is like hitting a monster, it has to be a close one. Only this, record, hard these years, this live in the present great youth.

15 M 28, 2014 9:21:02Afternoon com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin02 Warning: connectionid:1 clientconnectionid:10c92eac-e4c6-48d1-ba33-b50911fd4368 prelogin error:host localhost port 8080 Unexpected end of Prelogin response after 0bytes ReadCom.microsoft.sqlserver.jdbc.SQLServerException: TCP/IP connection to host localhost via port 8080 failed. Error: "The driver received an unexpected pre-logon response. Verify the connection properties and check that the instance of SQL Server is running on the host and that the TCP/IP connection is accepted on this port. This driver can only be used with SQL Server 2000 or later versions. ”。 clientconnectionid:10c92eac-e4c6-48d1-ba33-b50911fd4368At Com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate (sqlserverconnection.java:1667)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate (sqlserverconnection.java:1654)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin (sqlserverconnection.java:1442)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper (sqlserverconnection.java:1319)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.login (sqlserverconnection.java:991)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.connect (sqlserverconnection.java:827)Ten at Com.microsoft.sqlserver.jdbc.SQLServerDriver.connect (sqlserverdriver.java:1012)11At java.sql.DriverManager.getConnection (Unknown Source)12At java.sql.DriverManager.getConnection (Unknown Source)At Com.news.util.DbUtil.getcon (dbutil.java:18)+ at Com.news.daoImpl.TopicDaoImpl.displayTopic (topicdaoimpl.java:17)At Org.apache.jsp.index_jsp._jspservice (index_jsp.java:147)At Org.apache.jasper.runtime.HttpJspBase.service (httpjspbase.java:70)+ at Javax.servlet.http.HttpServlet.service (httpservlet.java:727)At Org.apache.jasper.servlet.JspServletWrapper.service (jspservletwrapper.java:432)At Org.apache.jasper.servlet.JspServlet.serviceJspFile (jspservlet.java:390)At Org.apache.jasper.servlet.JspServlet.service (jspservlet.java:334)At Javax.servlet.http.HttpServlet.service (httpservlet.java:727)At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:303)At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208)At Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52)At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:241)At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208)At Org.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:220)At Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:122)At Org.apache.catalina.authenticator.AuthenticatorBase.invoke (authenticatorbase.java:501)At Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:171)At Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:102)At Org.apache.catalina.valves.AccessLogValve.invoke (accesslogvalve.java:950)At Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:116)At Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:408)At Org.apache.coyote.http11.AbstractHttp11Processor.process (abstracthttp11processor.java:1040)At Org.apache.coyote.abstractprotocol$abstractconnectionhandler.process (abstractprotocol.java:607)PNS at Org.apache.tomcat.util.net.jioendpoint$socketprocessor.run (jioendpoint.java:314)38At Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)39At Java.util.concurrent.threadpoolexecutor$worker.run (Unknown Source)At Org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run (taskthread.java:61)At Java.lang.Thread.run (Unknown Source)

See the 080 port, do not see too understand, how should solve?

8080 is the port of the Project Access server is not the database access port number changed to 1433 after the error

Com.microsoft.sqlserver.jdbc.SQLServerException: TCP/IP connection to host localhost via port 1433 failed. Error: "Connection refused:connect. Please verify the connection properties. Ensure that an instance of SQL Server is running on the host and that this port accepts tcp/IP connection, and also make sure that the firewall does not block TCP connections to this port. ”。 At Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError (sqlserverexception.java:190)At Com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException ( sqlserverexception.java:241)At Com.microsoft.sqlserver.jdbc.SocketFinder.findSocket (iobuffer.java:2243)At Com.microsoft.sqlserver.jdbc.TDSChannel.open (iobuffer.java:491)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper (sqlserverconnection.java:1309)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.login (sqlserverconnection.java:991)At Com.microsoft.sqlserver.jdbc.SQLServerConnection.connect (sqlserverconnection.java:827)At Com.microsoft.sqlserver.jdbc.SQLServerDriver.connect (sqlserverdriver.java:1012)10At java.sql.DriverManager.getConnection (Unknown Source)11At java.sql.DriverManager.getConnection (Unknown Source)At Com.news.util.DbUtil.getcon (dbutil.java:18)At Com.news.daoImpl.TopicDaoImpl.displayTopic (topicdaoimpl.java:17)+ at Org.apache.jsp.index_jsp._jspservice (index_jsp.java:147)At Org.apache.jasper.runtime.HttpJspBase.service (httpjspbase.java:70)At Javax.servlet.http.HttpServlet.service (httpservlet.java:727)+ at Org.apache.jasper.servlet.JspServletWrapper.service (jspservletwrapper.java:432)At Org.apache.jasper.servlet.JspServlet.serviceJspFile (jspservlet.java:390)At Org.apache.jasper.servlet.JspServlet.service (jspservlet.java:334)At Javax.servlet.http.HttpServlet.service (httpservlet.java:727)At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:303)At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208)At Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52)At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:241)At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208)At Org.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:220)At Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:122)At Org.apache.catalina.authenticator.AuthenticatorBase.invoke (authenticatorbase.java:501)At Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:171)At Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:102)At Org.apache.catalina.valves.AccessLogValve.invoke (accesslogvalve.java:950)At Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:116)At Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:408)At Org.apache.coyote.http11.AbstractHttp11Processor.process (abstracthttp11processor.java:1040)At Org.apache.coyote.abstractprotocol$abstractconnectionhandler.process (abstractprotocol.java:607)At Org.apache.tomcat.util.net.jioendpoint$socketprocessor.run (jioendpoint.java:314)37At Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)38At Java.util.concurrent.threadpoolexecutor$worker.run (Unknown Source)At Org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run (taskthread.java:61)At Java.lang.Thread.run (Unknown Source)

Workaround: from "All Programs" in "Start", open the SQL Server Configuration Manager (configuration Management) for Microsoft server 2008R2 , and then enable the TCP/IP protocol.


Next, restart the database service: computer-management-services and applications-start the database service


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.