HTTP Status 500 – Internal Server Error


Type Exception Report

Message javax.servlet.jsp.JspException:

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

Exception

javax.servlet.ServletException: javax.servlet.jsp.JspException:  
            SELECT parent_category,description_category from master_category where id_category=
        : 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 '' at line 1
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:664)
	org.apache.jsp.pd.universal_002dthread.ellysia_002dmicrosuede_002dshort_002dfunctional_002dwinter_002dboots._54581453_002d4_002d3.index_jsp._jspService(index_jsp.java:2364)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)
	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

java.sql.SQLSyntaxErrorException: 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 '' at line 1
	com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)
	com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1024)
	org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
	org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
	org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:224)
	org.apache.jsp.pd.universal_002dthread.ellysia_002dmicrosuede_002dshort_002dfunctional_002dwinter_002dboots._54581453_002d4_002d3.index_jsp._jspx_meth_sql_005fquery_005f3(index_jsp.java:3308)
	org.apache.jsp.pd.universal_002dthread.ellysia_002dmicrosuede_002dshort_002dfunctional_002dwinter_002dboots._54581453_002d4_002d3.index_jsp._jspService(index_jsp.java:436)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)
	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)

Note The full stack trace of the root cause is available in the server logs.


Apache Tomcat/9.0.12