This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Problems with pivot table

General questions regarding the development with JVx.

Problems with pivot table

Postby Davidge » Wed Nov 18, 2020 4:16 pm

Hi,

I've problem with a pivot query. When the count of pivot columns changes and I reopen my workscreen, I get this error message. Is it possible to clear the meta data of my local RemoteDataBook?

Code: Select all
P1: BAS-99999: javax.rad.model.ModelException: Remote storage returned 7 value(s) but 8 were expected (check meta data)!
   at com.sibvisions.rad.model.remote.RemoteDataPage.fetchToRow(RemoteDataPage.java:213)
   at com.sibvisions.rad.model.mem.MemDataPage.getDataRowStorage(MemDataPage.java:547)
   at com.sibvisions.rad.model.mem.MemDataBook.setSelectedRowInternal(MemDataBook.java:5912)
   at com.sibvisions.rad.model.mem.MemDataBook.correctSelectedRow(MemDataBook.java:5670)
   at com.sibvisions.rad.model.mem.MemDataBook.sync(MemDataBook.java:5740)
   at com.sibvisions.rad.model.mem.MemDataBook.getSelectedDataPageRow(MemDataBook.java:1983)
   at com.sibvisions.rad.model.mem.MemDataBook.getSelectedRow(MemDataBook.java:1409)
   at com.sibvisions.apps.components.NavigationTable.doEnableButtons(NavigationTable.java:1575)
   at com.sibvisions.apps.components.NavigationTable.beforeAddNotify(NavigationTable.java:447)
   at javax.rad.genui.UIContainer.beforeAddNotify(UIContainer.java:251)
   at javax.rad.genui.UIContainer.beforeAddNotify(UIContainer.java:251)
   at javax.rad.genui.UIContainer.beforeAddNotify(UIContainer.java:251)
   at javax.rad.genui.UIContainer.beforeAddNotify(UIContainer.java:251)
   at javax.rad.genui.UIContainer.beforeAddNotify(UIContainer.java:251)
   at com.sibvisions.apps.projx.screens.DataSourceWorkScreen.beforeAddNotify(DataSourceWorkScreen.java:326)
   at javax.rad.genui.UIContainer.addInternal(UIContainer.java:497)
   at javax.rad.genui.UIContainer.add(UIContainer.java:141)
   at javax.rad.genui.UIContainer.add(UIContainer.java:123)
   at com.sibvisions.apps.projx.InternalFrameWorkScreenManager.createContainer(InternalFrameWorkScreenManager.java:159)
   at de.grass.apps.coago.GrassWorkScreenManager.createContainer(GrassWorkScreenManager.java:27)
   at com.sibvisions.apps.projx.ProjX.openWorkScreen(ProjX.java:2196)
   at de.grass.apps.coago.GrassApplication.openWorkScreen(GrassApplication.java:1594)
   at com.sibvisions.apps.projx.ProjX.openWorkScreen(ProjX.java:878)
   at de.grass.apps.coago.util.pgm.AbstractPgmCommandModuleCall.doModuleCall(AbstractPgmCommandModuleCall.java:141)
   at de.grass.apps.coago.util.pgm.AbstractPgmCommandModuleCall.doAfterSetPgmData(AbstractPgmCommandModuleCall.java:170)
   at de.grass.apps.coago.util.pgm.AbstractPgmCommandModuleCall.executeLoc(AbstractPgmCommandModuleCall.java:95)
   at de.grass.apps.coago.util.pgm.PgmCommandCF.executeLoc(PgmCommandCF.java:37)
   at de.grass.apps.coago.util.pgm.AbstractPgmCommandModuleCall.lambda$executeWithAsk4Commit$0(AbstractPgmCommandModuleCall.java:62)
   at de.grass.apps.coago.util.InvokeUtil.lambda$invokeInUI$9(InvokeUtil.java:139)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Davidge
 
Posts: 7
Joined: Fri Aug 28, 2020 4:28 pm

Re: Problems with pivot table

Postby Support@SIB » Mon Nov 23, 2020 2:11 pm

Did you try:

Code: Select all
remoteDataBook.setMetaDataCacheEnabled(false);

This code is for client-side metadata caching. It's also possible to clear the client-side metadata via

Code: Select all
RemoteDataSource.clearGlobalMetaData(screenConnection)

This call will clear the metadata of one screen.

On server-side, call:

Code: Select all
AbstractCachedStorage.removeMetaData(SessionContext.getCurrentSession().getLifeCycleName());

to remove the cache per lifecycle object. It's also possible to clear the cache per application name, but above methods will help you.
User avatar
Support@SIB
 
Posts: 349
Joined: Mon Sep 28, 2009 1:56 pm

Re: Problems with pivot table

Postby Davidge » Tue Nov 24, 2020 11:04 am

Hi,

this works for a close and new reopen of my workscreen. But when data is changed in the background and I do a refresh in my workscreen, I'll get the same error! It seems that the server side clear does work but the client will not get the effect.
Davidge
 
Posts: 7
Joined: Fri Aug 28, 2020 4:28 pm

Re: Problems with pivot table

Postby Support@SIB » Tue Nov 24, 2020 11:52 am

Clear, because the databook is still open and has old metadata, e.g. 2 columns. The metadata are required for the table columns, ... And as long as the databook is open, the same metadata will be used.

If you change the column list because the server-side storage has changed - which may be confusing for the user - you have to notify the databook. Also, if you don't change the number of columns but the column order, it's also the same!

This is a general development problem and not related to the framework :!:

You could close/open the databook in case of reload?
User avatar
Support@SIB
 
Posts: 349
Joined: Mon Sep 28, 2009 1:56 pm


Return to Development