问答详情
源自:4-10 创建数据库表

我是把war包直接放在了webapps目录下报500错误

Type Exception Report

Message An exception occurred processing [/index.jsp] at line [3]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing [/index.jsp] at line [3]

1: <%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
2: <html>
3: <jsp:forward page="/showMenus"></jsp:forward>
4: </html>


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:626)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:500)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
### The error may exist in com/lesson/dao/MenuDAO.java (best guess)
### The error may involve com.lesson.dao.MenuDAO.getMenuByMidCid


提问者:慕莱坞8157290 2018-11-27 17:03

个回答

  • 慕工程9381067
    2018-11-28 22:44:15

    报错很明显吧,数据库连接错误