org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) javax.servlet.http.HttpServlet.service(HttpServlet.java:622) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

org.hibernate.exception.SQLGrammarException: could not extract ResultSet
	org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:80)
	org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
	org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
	org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
	org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:91)
	org.hibernate.loader.Loader.getResultSet(Loader.java:2066)
	org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)
	org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)
	org.hibernate.loader.Loader.doQuery(Loader.java:910)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
	org.hibernate.loader.Loader.doList(Loader.java:2554)
	org.hibernate.loader.Loader.doList(Loader.java:2540)
	org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)
	org.hibernate.loader.Loader.list(Loader.java:2365)
	org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:353)
	org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:1873)
	org.hibernate.internal.AbstractSessionImpl.list(AbstractSessionImpl.java:311)
	org.hibernate.internal.SQLQueryImpl.list(SQLQueryImpl.java:141)
	com.dl.sys.dao.ProductDao.getList1(ProductDao.java:433)
	com.dl.sys.service.ProductService.listByKey(ProductService.java:270)
	com.dl.sys.controller.JspController.toproductListByTypeId(JspController.java:500)
	sun.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-203' at line 1
	sun.reflect.GeneratedConstructorAccessor116.newInstance(Unknown Source)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
	com.mysql.jdbc.Util.getInstance(Util.java:360)
	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
	com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
	com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
	com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030)
	com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:404)
	org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82)
	org.hibernate.loader.Loader.getResultSet(Loader.java:2066)
	org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)
	org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)
	org.hibernate.loader.Loader.doQuery(Loader.java:910)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
	org.hibernate.loader.Loader.doList(Loader.java:2554)
	org.hibernate.loader.Loader.doList(Loader.java:2540)
	org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)
	org.hibernate.loader.Loader.list(Loader.java:2365)
	org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:353)
	org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:1873)
	org.hibernate.internal.AbstractSessionImpl.list(AbstractSessionImpl.java:311)
	org.hibernate.internal.SQLQueryImpl.list(SQLQueryImpl.java:141)
	com.dl.sys.dao.ProductDao.getList1(ProductDao.java:433)
	com.dl.sys.service.ProductService.listByKey(ProductService.java:270)
	com.dl.sys.controller.JspController.toproductListByTypeId(JspController.java:500)
	sun.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.43 logs.


Apache Tomcat/8.0.43