Ooops... Mamy problem.
Message:The bean encountered a non-application exception; nested exception is:
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ASC, t1.NAME ASC LIMIT 0, 15' at line 1
Error Code: 1064
Call: SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?
bind => [17 parameters bound]
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?")javax.ejb.EJBException: The bean encountered a non-application exception; nested exception is:
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ASC, t1.NAME ASC LIMIT 0, 15' at line 1
Error Code: 1064
Call: SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?
bind => [17 parameters bound]
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?")
at org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:449)
at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:353)
at pl.kena.kenaweb.jpa.SProductFacade$$LocalBeanProxy.mainList(pl/kena/kenaweb/jpa/SProductFacade.java)
at pl.kena.kenaweb.beans.ViewBean$1.load(ViewBean.java:242)
at org.primefaces.component.datagrid.DataGrid.loadLazyData(DataGrid.java:179)
at org.primefaces.component.datagrid.DataGridRenderer.encodeMarkup(DataGridRenderer.java:70)
at org.primefaces.component.datagrid.DataGridRenderer.encodeEnd(DataGridRenderer.java:49)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:309)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:309)
at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:186)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:309)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:151)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at pl.kena.kenaweb.filters.CacheFilter.doFilter(CacheFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:667)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:432)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ASC, t1.NAME ASC LIMIT 0, 15' at line 1
Error Code: 1064
Call: SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?
bind => [17 parameters bound]
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?")
at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:391)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:264)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482)
at pl.kena.kenaweb.jpa.SProductFacade.mainList(SProductFacade.java:237)
at jdk.internal.reflect.GeneratedMethodAccessor35226.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:191)
at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:102)
at jdk.internal.reflect.GeneratedMethodAccessor337.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:252)
at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:212)
at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:265)
at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:260)
at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:89)
at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:349)
... 68 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ASC, t1.NAME ASC LIMIT 0, 15' at line 1
Error Code: 1064
Call: SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?
bind => [17 parameters bound]
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID AS a1, t1.ACTIVE AS a2, t1.CHANGETIME AS a3, t1.CODE AS a4, t1.DESCRIPTION AS a5, t1.DISCOUNT AS a6, t1.NAME AS a7, t1.OLDID AS a8, t1.PRICE AS a9, t1.REGISTERTIME AS a10, t1.TAXRATE AS a11, t1.UNIT AS a12, t1.VERSION AS a13, t1.WEIGHT AS a14, t1.MENUITEM_ID AS a15, t1.PRODUCTICON_ID AS a16, t0.ID AS a17, t0.ALT AS a18, t0.FILESIZE AS a19, t0.HEIGHT AS a20, t0.IMAGEFILEPATH AS a21, t0.WIDTH AS a22, t2.PRODUCT_ID AS a23, t2.QUANTITY AS a24 FROM SPRODUCT t1 LEFT OUTER JOIN SIMAGE t0 ON (t0.ID = t1.PRODUCTICON_ID) LEFT OUTER JOIN SPRODUCTQUANTITY t2 ON (t2.PRODUCT_ID = t1.ID), SMENUITEM t3 WHERE ((((((t1.MENUITEM_ID > ?) AND (t1.ACTIVE = ?)) AND ((? IS NULL) OR (((t1.MENUITEM_ID = ?) OR (t3.PARRENTMENU_ID = ?)) OR t1.ID IN (SELECT DISTINCT t4.ID FROM SPRODUCT t4 LEFT OUTER JOIN (SMENUITEM_SPRODUCT t6 JOIN SMENUITEM t5 ON (t5.ID = t6.menuItems_ID)) ON (t6.products_ID = t4.ID) WHERE (? = t5.ID))))) AND ((? IS NULL) OR (LOWER(t1.CODE) REGEXP ? OR LOWER(t1.NAME) REGEXP ?))) AND ((? = ?) OR (t1.DISCOUNT > ?))) AND (t3.ID = t1.MENUITEM_ID)) ORDER BY CASE WHEN (t2.QUANTITY > ?) THEN ? WHEN ? THEN ASC, t1.NAME ASC LIMIT ?, ?")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:342)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:691)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2099)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:277)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:263)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:334)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:746)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2768)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2721)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:584)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1232)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:911)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1191)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:485)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1279)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2983)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262)
... 89 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ASC, t1.NAME ASC LIMIT 0, 15' at line 1
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
at jdk.internal.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
at com.sun.proxy.$Proxy157.executeQuery(Unknown Source)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1015)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:651)
... 109 more