| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2437 人关注过本帖
标题:jsp 链接mysql失败 求教!!
只看楼主 加入收藏
sheneai
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2015-11-4
收藏
 问题点数:0 回复次数:0 
jsp 链接mysql失败 求教!!
jsp 登陆界面  点击登陆后出现错误  异常如下:

com.mysql. Communications link failure due to underlying exception:

 ** BEGIN NESTED EXCEPTION **

 
 MESSAGE: Connection refused: connect

 STACKTRACE:

  Connection refused: connect
     at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
     at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
     at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
     at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
     at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
     at java.sql.DriverManager.getConnection(DriverManager.java:582)
     at java.sql.DriverManager.getConnection(DriverManager.java:185)
     at com.zzz.util.DbUtil.getCon(DbUtil.java:27)
     at com.zzz.servlet.LoginServlet.doGet(LoginServlet.java:33)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
     at org.apache.tomcat.(JIoEndpoint.java:316)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
     at java.lang.Thread.run(Thread.java:619)


 ** END NESTED EXCEPTION **



 Last packet sent to the server was 7 ms ago.
     at com.mysql.jdbc.Connection.createNewIO(Connection.java:2621)
     at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
     at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
     at java.sql.DriverManager.getConnection(DriverManager.java:582)
     at java.sql.DriverManager.getConnection(DriverManager.java:185)
     at com.zzz.util.DbUtil.getCon(DbUtil.java:27)
     at com.zzz.servlet.LoginServlet.doGet(LoginServlet.java:33)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
     at org.apache.tomcat.(JIoEndpoint.java:316)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

     at java.lang.Thread.run(Thread.java:619)
 com.mysql. Communications link failure due to underlying exception:

 ** BEGIN NESTED EXCEPTION **


页面是空白  请教各位应该怎么调试?
搜索更多相关主题的帖子: mysql failure 
2015-11-04 21:22
快速回复:jsp 链接mysql失败 求教!!
数据加载中...
 
   



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

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