| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 788 人关注过本帖
标题:连接异常问题!
只看楼主 加入收藏
fly521
Rank: 2
来 自:河南
等 级:论坛游民
帖 子:11
专家分:20
注 册:2009-6-7
结帖率:100%
收藏
已结贴  问题点数:10 回复次数:3 
连接异常问题!
jsp页面连接sql server2000 出现异常  是不是跟 sql没升级?
type Exception report

message

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

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /html/sqltest.jsp at line 10

7: //pubs为你的数据库的
8: String user="sa";
9: String password="";
10: Connection conn= DriverManager.getConnection(url,user,password);
11: Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
12: String sql="select * from myusers";
13: ResultSet rs=stmt.executeQuery(sql);


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

javax.servlet.ServletException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
    org.apache.jsp.html.sqltest_jsp._jspService(sqltest_jsp.java:91)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


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:582)
    java.sql.DriverManager.getConnection(DriverManager.java:185)
    org.apache.jsp.html.sqltest_jsp._jspService(sqltest_jsp.java:63)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

搜索更多相关主题的帖子: sql processing password occurred server 
2010-04-14 23:05
gameohyes
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:湖南
等 级:版主
威 望:53
帖 子:1275
专家分:3629
注 册:2009-3-5
收藏
得分:3 
抓住要点。分析这句看看
javax.servlet.ServletException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

C#超级群 74862681,欢迎大家的到来!
2010-04-14 23:36
fly521
Rank: 2
来 自:河南
等 级:论坛游民
帖 子:11
专家分:20
注 册:2009-6-7
收藏
得分:0 
是不是驱动包弄错了 我原先看了 但在网上说sql2000没有升级也会出现这个问题
2010-04-15 11:34
zhuyunshen
Rank: 6Rank: 6
等 级:侠之大者
威 望:2
帖 子:212
专家分:455
注 册:2009-11-22
收藏
得分:3 
驱动包弄错了
2010-04-15 11:38
快速回复:连接异常问题!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029283 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved