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

JSP连MYSQL问题
type   Exception   report

message  

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

exception  

javax.servlet.ServletException:   Communications   link   failure   due   to   underlying   exception:  

**   BEGIN   NESTED   EXCEPTION   **  

java.net.ConnectException
MESSAGE:   Connection   refused:   connect

STACKTRACE:

java.net.ConnectException:   Connection   refused:   connect
at   java.net.PlainSocketImpl.socketConnect(Native   Method)
at   java.net.PlainSocketImpl.doConnect(Unknown   Source)
at   java.net.PlainSocketImpl.connectToAddress(Unknown   Source)
at   java.net.PlainSocketImpl.connect(Unknown   Source)
at   java.net.SocksSocketImpl.connect(Unknown   Source)
at   java.net.Socket.connect(Unknown   Source)
at   java.net.Socket.connect(Unknown   Source)
at   java.net.Socket. <init> (Unknown   Source)
at   java.net.Socket. <init> (Unknown   Source)
at   com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:132)
at   com.mysql.jdbc.MysqlIO. <init> (MysqlIO.java:273)
at   com.mysql.jdbc.Connection.createNewIO(Connection.java:1639)
at   com.mysql.jdbc.Connection. <init> (Connection.java:393)
at   com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:262)
at   java.sql.DriverManager.getConnection(Unknown   Source)
at   java.sql.DriverManager.getConnection(Unknown   Source)
at   org.apache.jsp.deallogin_jsp._jspService(org.apache.jsp.deallogin_jsp:54)
at   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at   org.apache.tomcat.util.ne