小编Tob*_*hal的帖子

Tomcat6无法连接到MySql(驱动程序未收到来自服务器的任何数据包)

我使用Ubuntu 9.10作为操作系统在我的本地计算机上运行Apache Tomcat 6.0.20/MySQL 5.1.37-lubuntu/sun-java6-jdk/sun-java6-jre/sun-java6-bin.我试图让一个简单的数据库查询示例现在运行2天,但我仍然得到这个例外:

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)"
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has …
Run Code Online (Sandbox Code Playgroud)

mysql database-connection tomcat6

6
推荐指数
1
解决办法
4万
查看次数

标签 统计

database-connection ×1

mysql ×1

tomcat6 ×1