一直没法连接成功,几天了,郁闷死了。先说下,测试程序没有问题,系统是XP+SP
2,然后sql server 也装了SP4的补丁。下面是输出页面,大家帮我分析下错误原因吧。
HTTP Status 500 -
------------------------------------------
--
type Exception report
message
description The server encountered an internal error () that prevented it from
fulfilling this request.
exception
org.apache.jasper.JasperException: [Microsoft][SQLServer JDBC Driver]Error est
ablishing socket.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrap
per.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:37
7)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: [Microsoft][SQLServer JDBC Driver]Error establ
ishing socket.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextIm
pl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl
.java:776)
org.apache.jsp.sql_005ftest_jsp._jspService(sql_005ftest_jsp.java:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:33
4)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing so
cket.
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
com.microsoft.jdbc.sqlserver.tds.TDSConnection. <init> (Unknown Source)
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
org.apache.jsp.sql_005ftest_jsp._jspService(sql_005ftest_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:33
4)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/
5.5.20 logs.
--
------解决方案--------------------
楼主装了Microsoft SQL Server 2000 Driver for JDBC了吗?
------解决方案--------------------