启动服务器没有报错,在http://localhost:8080/下也访问到了index.jsp的内容。测试的时候就报这个500的服务器错误
这些是body里面返回的信息
BODY
pretty
type Exception report
message Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION mmall_learning.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual ### The error may exist in file [D:\360\workspace2\maven_web\target\mmall\WEB-INF\classes\mappers\UserMapper.xml] ### The error may involve com.mmall.dao.UserMapper.checkUsername-Inline ### The error occurred while setting parameters ### SQL: select count (1) from mmall_user where username=? ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION mmall_learning.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION mmall_learning.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:943) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833) javax.servlet.http.HttpServlet.service(HttpServlet.java:650) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
root cause
org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION mmall_learning.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual ### The error may exist in file [D:\360\workspace2\maven_web\target\mmall\WEB-INF\classes\mappers\UserMapper.xml] ### The error may involve com.mmall.dao.UserMapper.checkUsername-Inline ### The error occurred while setting parameters ### SQL: select count (1) from mmall_user where username=? ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION mmall_learning.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION mmall_learning.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:95) org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75) org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447) com.sun.proxy.$Proxy18.selectOne(Unknown Source) org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:167) org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82) org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) com.sun.proxy.$Proxy19.checkUsername(Unknown Source) com.mmall.service.impl.UserServiceImpl.login(UserServiceImpl.java:32) com.mmall.controller.portal.UserController.login(UserController.java:39) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:214) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833) javax.servlet.http.HttpServlet.service(HttpServlet.java:650) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)