jenkins構(gòu)建好之后打開頁面提示jdbc連接有問題
在Intellij里運(yùn)行tomcat打開項(xiàng)目是可以在瀏覽器上打開這個(gè)頁面的,然后我Jenkins里部署也好了,也提示tomcat啟動(dòng)成功,但是瀏覽器訪問就出以下錯(cuò)誤(這里是片段),看樣子是jdbc連接問題
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 ###?The?error?occurred?while?executing?a?query ###?Cause:?org.springframework.jdbc.CannotGetJdbcConnectionException:?Could?not?get?JDBC?Connection;?n
2019-08-21
問題解決了嗎?求解
2018-12-25
你看看你tomcat啟動(dòng)日志有沒有報(bào)錯(cuò)