日期:2014-05-18  浏览次数:20667 次

javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
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:   Exception   in   JSP:   /test.jsp:13

10:   //pubs为你的数据库的  
11:   String   user= "sa ";  
12:   String   password= " ";  
13:   Connection   conn=   DriverManager.getConnection(url,user,password);  
14:  
15:   out.print(conn);
16:   Statement   stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);  


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
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   2000   Driver   for   JDBC]Error   establishing   socket.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:91)
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:332)
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   2000   Driver   for   JDBC]Error   establishing   socket.
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown   Source)
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)