当前位置: 代码迷 >> Java Web开发 >> [分享]jsp连接数据库大全
  详细解决方案

[分享]jsp连接数据库大全

热度:234   发布时间:2006-04-01 01:40:00.0
为什么我连SQL2000不行啊,出现这些

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 2000 Driver for JDBC]Error establishing socket.
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
	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:858)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
	org.apache.jsp.testsqlserver_jsp._jspService(testsqlserver_jsp.java:79)
	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)
	org.apache.jsp.testsqlserver_jsp._jspService(testsqlserver_jsp.java:51)
	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)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.


----------------解决方案--------------------------------------------------------

强项!!


----------------解决方案--------------------------------------------------------

顶呱呱


----------------解决方案--------------------------------------------------------

连接ACCESS能不能 和ASP一样 直接连接数据库文件啊?
不要配置ODBC。那样好麻烦的


----------------解决方案--------------------------------------------------------
请问楼主,有没有连接iHistorian数据库的实例呀

jsp可以连接iHistorian吗?
----------------解决方案--------------------------------------------------------
请问楼主,有没有连接iHistorian数据库的实例呀

jsp可以连接iHistorian吗?
----------------解决方案--------------------------------------------------------
jsp连接Sql Server7.0/2000数据库 是不是还要配置什么啊
----------------解决方案--------------------------------------------------------

你的错误是服务器异常,是Tomcat的原因。


----------------解决方案--------------------------------------------------------
以下是引用sharprick在2005-12-29 14:09:00的发言:
我用JSP连接SQL Server 2000 会出现如下问题:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.testsqlserver_jsp._jspService(testsqlserver_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
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(DriverManager.java:512)
java.sql.DriverManager.getConnection(DriverManager.java:171)
org.apache.jsp.testsqlserver_jsp._jspService(testsqlserver_jsp.java:52)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.


Apache Tomcat/5.0




你的事故服务器异常,是Tomcat的原因
----------------解决方案--------------------------------------------------------
以下是引用wxmm2003在2006-4-21 20:46:00的发言:
jsp连接Sql Server7.0/2000数据库 是不是还要配置什么啊

要SQL的驱动(数据库的驱动)
----------------解决方案--------------------------------------------------------

  相关解决方案