Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Database/JDBC/SQL/JDO/Hibernate  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:请求高手解决一个JDBC连接的问题。 [Re:jin3shan]
jin3shan





发贴: 33
积分: 0
于 2006-05-20 13:15 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
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: /testMssql.jsp:26

23: <%
24:
25: Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
26: Connection con=java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=jspdev","sa","sa");
27: Statement stmt=con.createStatement();
28: ResultSet rst=stmt.executeQuery("select * from book;");
29: while(rst.next())

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:858)
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
  org.apache.jsp.testMssql_jsp._jspService(testMssql_jsp.java:99)
  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(DriverManager.java:525)
  java.sql.DriverManager.getConnection(DriverManager.java:171)
  org.apache.jsp.testMssql_jsp._jspService(testMssql_jsp.java:71)
  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.17 logs.
这又是什么错误.




致JAVA初学者+如何下手学JAVA

话题树型展开
人气 标题 作者 字数 发贴时间
20386 请求高手解决一个JDBC连接的问题。 jin3shan 3565 2006-05-19 14:27
17620 Re:请求高手解决一个JDBC连接的问题。 why 190 2006-05-20 11:07
17881 Re:请求高手解决一个JDBC连接的问题。 jin3shan 2024 2006-05-20 12:47
17562 Re:请求高手解决一个JDBC连接的问题。 why 915 2006-05-21 22:03
17793 Re:请求高手解决一个JDBC连接的问题。 jin3shan 3184 2006-05-20 13:15
17657 Re:请求高手解决一个JDBC连接的问题。 jin3shan 20 2006-05-22 08:44
17532 Re:请求高手解决一个JDBC连接的问题。 why 303 2006-05-22 12:41
17899 Re:请求高手解决一个JDBC连接的问题。 jin3shan 2978 2006-05-22 09:32
19618 Re:请求高手解决一个JDBC连接的问题。 CRYSPARK 30 2006-06-22 11:55

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923