org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
### The error may exist in com/itheima/mapper/BrandMapper.java (best guess)
### The error may involve com.itheima.mapper.BrandMapper.selectAll
### The error occurred while executing a query
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)
jdk.proxy4/jdk.proxy4.$Proxy31.selectAll(Unknown Source)
com.itheima.service.impl.BrandServiceImpl.selectAll(BrandServiceImpl.java:25)
com.itheima.web.select.SelectAllServlet.doGet(SelectAllServlet.java:22)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
原因好像是没有重新编译项目
点击project——>build,重新编译一下项目就好了
标签:java,prevented,request,encountered,ibatis,apache,org,com,### From: https://www.cnblogs.com/yzx-sir/p/17425352.html