Fetch statement failed

General questions regarding the development with JVx.

Fetch statement failed

Postby ngrkavac » Wed Nov 18, 2015 2:30 pm

Hi all,

we have got DataSourceException when trying to display items in dropdown list:

Code: Select all
javax.rad.model.ModelException: Fetch to Row failed!
        at com.sibvisions.rad.model.remote.RemoteDataPage.fetchToRow(RemoteDataPage.java:266)
        at com.sibvisions.rad.model.mem.MemDataPage.searchNext(MemDataPage.java:277)
        at com.sibvisions.rad.model.mem.MemDataPage.searchNext(MemDataPage.java:263)
        at com.sibvisions.rad.model.mem.MemDataBook.searchNext(MemDataBook.java:2717)
        at com.sibvisions.rad.ui.vaadin.ext.ui.table.JVxLinkedContainer.indexOfId(JVxLinkedContainer.java:506)
        at com.vaadin.ui.ComboBox.getOptionsWithFilter(ComboBox.java:401)
        at com.vaadin.ui.ComboBox.paintContent(ComboBox.java:226)
        at com.vaadin.server.LegacyPaint.paint(LegacyPaint.java:65)
        at com.vaadin.server.communication.LegacyUidlWriter.write(LegacyUidlWriter.java:82)
        at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:115)
        at com.vaadin.server.communication.UidlRequestHandler.writeUidl(UidlRequestHandler.java:155)
        at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:101)
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
        at com.sibvisions.rad.ui.vaadin.server.VaadinServlet.service(VaadinServlet.java:157)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:155)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:110)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.rad.persist.DataSourceException: fetch statement failed! - SELECT * FROM MASTERDATA.APPLICATION
        at com.sibvisions.rad.persist.jdbc.DBAccess.fetch(DBAccess.java:1758)
        at com.sibvisions.rad.persist.jdbc.DBStorage.executeFetch(DBStorage.java:572)
        at com.sibvisions.rad.persist.AbstractStorage.fetch(AbstractStorage.java:319)
        at com.sibvisions.rad.persist.AbstractStorage.fetch(AbstractStorage.java:124)
        at sun.reflect.GeneratedMethodAccessor491.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.sibvisions.util.Reflective.call(Reflective.java:270)
        at com.sibvisions.util.Reflective.call(Reflective.java:177)
        at com.sibvisions.rad.server.DefaultObjectProvider.invoke(DefaultObjectProvider.java:423)
        at eu.dimoco.apps.dimadm.screens.DimFs_Document.<documentApplication.subStorages.application>.fetch(Unknown Source)
        at com.sibvisions.rad.server.AbstractSession.executeWithSessionContext(AbstractSession.java:735)
        at com.sibvisions.rad.server.AbstractSession.executeIntern(AbstractSession.java:687)
        at com.sibvisions.rad.server.AbstractSession.execute(AbstractSession.java:655)
        at com.sibvisions.rad.server.Server.executeIntern(Server.java:2131)
        at com.sibvisions.rad.server.Server.execute(Server.java:532)
        at com.sibvisions.rad.server.DirectServerConnection.call(DirectServerConnection.java:270)
        at javax.rad.remote.AbstractConnection.call(AbstractConnection.java:626)
        at com.sibvisions.rad.model.remote.RemoteDataPage.fetchToRow(RemoteDataPage.java:186)
        ... 81 more
Caused by: java.lang.ArrayIndexOutOfBoundsException



This kind of exception appears only on our production instance, so I guess it is data related.

Have you got an idea - what could be the cause of this behaviour? Thanks in advance!
ngrkavac
 
Posts: 2
Joined: Wed Nov 18, 2015 2:01 pm

Re: Fetch statement failed

Postby Development@SIB » Wed Nov 18, 2015 3:10 pm

The root problem is the ArrayIndexOutOfBoundsException.

First: Which JVx version and which VaadinUI version do you use?

We fixed many problems since last release and nightly builds can be used for tests!
User avatar
Development@SIB
 
Posts: 311
Joined: Mon Sep 28, 2009 1:54 pm

Re: Fetch statement failed

Postby Support@SIB » Wed Nov 18, 2015 3:18 pm

When does this exception occur?
If you open a screen, if you open the cell editor?

Do you have the full stack for us?
User avatar
Support@SIB
 
Posts: 198
Joined: Mon Sep 28, 2009 1:56 pm

Re: Fetch statement failed

Postby ngrkavac » Wed Nov 18, 2015 3:40 pm

Hi,

We use VisionX 2.2.403 (Enterprise).

All vaadin Jars are 7.5.0.

This exception occurs after opening the cell editor. I believe this is the full stack trace for the actual event.
ngrkavac
 
Posts: 2
Joined: Wed Nov 18, 2015 2:01 pm

Re: Fetch statement failed

Postby Support@SIB » Wed Nov 18, 2015 4:46 pm

The last stack is missing, after Caused by: java.lang.ArrayIndexOutOfBoundsException

It's hard to help you without a test-case and it's hard to guess what's the difference between your prod and test environment.

Did you test the Swing application with the prod environment?

The stack shows that the problem occurs in JVxLinkedContainer.indexOfId. This method will be used to find the index of the current value, in the list of records. Is it possible to debug the method (JVxLinkedContainer.indexOfId) in Eclipse?

The method contains:
Code: Select all
ICondition condition  = com.sibvisions.rad.model.Filter.createEqualsFilter(((IDataRow) pItemId), handler.getReferencedColumnNames());
            
return dataBook.searchNext(condition);

The value of pItemId and the condition could help to find the problem.
User avatar
Support@SIB
 
Posts: 198
Joined: Mon Sep 28, 2009 1:56 pm


Return to Development