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

jsp连接数据库出错
description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

org.apache.jasper.JasperException:   [Microsoft][SQLServer   2000   Driver   for   JDBC]End   of   stream   was   detected   on   a   read.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
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]End   of   stream   was   detected   on   a   read.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
org.apache.jsp.ooo.okok_jsp._jspService(okok_jsp.java:80)
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:334)
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]End   of   stream   was   detected   on   a   read.
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown   Source)
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown   Source)
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(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(DriverManager.java:525)
java.sql.DriverManager.getConnection(DriverManager.java:171)
org.apache.jsp.ooo.okok_jsp._jspService(okok_jsp.java:52)
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:334)
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.

用ASP连没问题,用JSP老是出现上面的错误。数据库是SQL2000,JDBC