工大后院

 找回密码
 加入后院

扫一扫,访问微社区

QQ登录

只需一步,快速开始

搜索
查看: 2475|回复: 4

jsp连接不到SQL数据库

[复制链接]
发表于 2008-4-27 11:31 | 显示全部楼层 |阅读模式
jsp连接不到SQL数据库,不知道是tomcat配置问题还是其他问题,请高手指教一下!请加Q:190961293
以下是返回的信息:
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.sql_jsp._jspService(sql_jsp.java:127)
        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.sql_jsp._jspService(sql_jsp.java:69)
        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.

[ 本帖最后由 爱不爱由你 于 2008-4-27 11:36 编辑 ]
发表于 2008-4-27 12:05 | 显示全部楼层
1. 查看是否防火墙阻止了访问,
2. 查看数据库的连接端口是否正确
3. 如果 SQL SERVER 是2000 SP2 的,建议升级到 SP3。
回复

使用道具 举报

发表于 2008-4-27 13:35 | 显示全部楼层
Please refer to https://www.gdutbbs.com/viewthread.php?tid=28274
Maybe it can give you a hand.
回复

使用道具 举报

发表于 2008-4-27 23:25 | 显示全部楼层
SQL Server 记得打上SP3的补丁。
   异常抛出应该是端口问题。
回复

使用道具 举报

头像被屏蔽
发表于 2008-5-3 09:43 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入后院

本版积分规则

QQ|Archiver|手机版|小黑屋|广告业务Q|工大后院 ( 粤ICP备10013660号 )

GMT+8, 2025-5-13 12:40

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表