Ooops... Mamy problem.
Message:The bean encountered a non-application exception; nested exception is:
javax.persistence.PersistenceException: Exception [EclipseLink-6168] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.QueryException
Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.ArrayIndexOutOfBoundsException].
Internal Exception: java.lang.ArrayIndexOutOfBoundsException
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID, t1.ACTIVE, t1.CHANGETIME, t1.CODE, t1.DESCRIPTION, t1.DISCOUNT, t1.NAME, t1.OLDID, t1.PRICE, t1.REGISTERTIME, t1.TAXRATE, t1.UNIT, t1.VERSION, t1.WEIGHT, t1.MENUITEM_ID, t1.PRODUCTICON_ID, t0.ID, t0.ALT, t0.FILESIZE, t0.HEIGHT, t0.IMAGEFILEPATH, t0.WIDTH, t2.PRODUCT_ID, t2.QUANTITY 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 ? ELSE ? END ASC, t1.NAME ASC")javax.ejb.EJBException: The bean encountered a non-application exception; nested exception is:
javax.persistence.PersistenceException: Exception [EclipseLink-6168] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.QueryException
Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.ArrayIndexOutOfBoundsException].
Internal Exception: java.lang.ArrayIndexOutOfBoundsException
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID, t1.ACTIVE, t1.CHANGETIME, t1.CODE, t1.DESCRIPTION, t1.DISCOUNT, t1.NAME, t1.OLDID, t1.PRICE, t1.REGISTERTIME, t1.TAXRATE, t1.UNIT, t1.VERSION, t1.WEIGHT, t1.MENUITEM_ID, t1.PRODUCTICON_ID, t0.ID, t0.ALT, t0.FILESIZE, t0.HEIGHT, t0.IMAGEFILEPATH, t0.WIDTH, t2.PRODUCT_ID, t2.QUANTITY 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 ? ELSE ? END ASC, t1.NAME ASC")
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-6168] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.QueryException
Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.ArrayIndexOutOfBoundsException].
Internal Exception: java.lang.ArrayIndexOutOfBoundsException
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID, t1.ACTIVE, t1.CHANGETIME, t1.CODE, t1.DESCRIPTION, t1.DISCOUNT, t1.NAME, t1.OLDID, t1.PRICE, t1.REGISTERTIME, t1.TAXRATE, t1.UNIT, t1.VERSION, t1.WEIGHT, t1.MENUITEM_ID, t1.PRODUCTICON_ID, t0.ID, t0.ALT, t0.FILESIZE, t0.HEIGHT, t0.IMAGEFILEPATH, t0.WIDTH, t2.PRODUCT_ID, t2.QUANTITY 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 ? ELSE ? END ASC, t1.NAME ASC")
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:493)
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-6168] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.QueryException
Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.ArrayIndexOutOfBoundsException].
Internal Exception: java.lang.ArrayIndexOutOfBoundsException
Query: ReadAllQuery(name="SProduct.mainList" referenceClass=SProduct sql="SELECT t1.ID, t1.ACTIVE, t1.CHANGETIME, t1.CODE, t1.DESCRIPTION, t1.DISCOUNT, t1.NAME, t1.OLDID, t1.PRICE, t1.REGISTERTIME, t1.TAXRATE, t1.UNIT, t1.VERSION, t1.WEIGHT, t1.MENUITEM_ID, t1.PRODUCTICON_ID, t0.ID, t0.ALT, t0.FILESIZE, t0.HEIGHT, t0.IMAGEFILEPATH, t0.WIDTH, t2.PRODUCT_ID, t2.QUANTITY 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 ? ELSE ? END ASC, t1.NAME ASC")
at org.eclipse.persistence.exceptions.QueryException.prepareFailed(QueryException.java:1598)
at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:692)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkPrepare(ObjectLevelReadQuery.java:968)
at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:622)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:879)
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)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482)
... 88 more
Caused by: java.lang.ArrayIndexOutOfBoundsException