cuba-platform / cuba

CUBA Platform is a high level framework for enterprise applications development
https://www.cuba-platform.com
Apache License 2.0
1.34k stars 219 forks source link

NPE occurs after saving dashboard chart widget parameters #3236

Open owlet1997 opened 3 years ago

owlet1997 commented 3 years ago

based on forum's question

Environment

CUBA Platform version: 7.2.15 CUBA Studio plugin version: 15.5-211 IntelliJ version: IntelliJ IDEA 2021.2.2 (Community Edition)

TC:

  1. Open attached project -> Run app
  2. Login as admin -> Reports
  3. Import attached report
  4. Application -> Projects -> Create some entities
  5. Dashboard -> Dashboards -> Create
  6. Widgets -> Drag and drop Chart widget to editor
  7. Fill the widget fields -> add parameters for chart: image
  8. Click Ok

AR: image

Exception log:

Caused by: java.lang.RuntimeException: Exception on action handling
    at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:104) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:67) ~[cuba-web-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76) ~[cuba-web-widgets-7.2.15.jar:na]
    at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    ... 42 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_301]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_301]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_301]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_301]
    at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:101) ~[cuba-gui-7.2.15.jar:7.2.15]
    ... 45 common frames omitted
Caused by: com.vaadin.v7.ui.Table$CacheUpdateException: Error during Table cache update. Additional causes not shown.
    at com.vaadin.v7.ui.Table.maybeThrowCacheUpdateExceptions(Table.java:1780) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    at com.vaadin.v7.ui.Table.refreshRenderedCells(Table.java:1769) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    at com.vaadin.v7.ui.Table.refreshRowCache(Table.java:2670) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    at com.haulmont.cuba.web.widgets.CubaTable.refreshRowCache(CubaTable.java:1186) ~[cuba-web-widgets-7.2.15.jar:na]
    at com.vaadin.v7.ui.Table.containerItemSetChange(Table.java:4572) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    at com.haulmont.cuba.web.gui.components.table.TableDataContainer.fireItemSetChanged(TableDataContainer.java:165) ~[cuba-web-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.gui.components.table.TableDataContainer.datasourceItemSetChanged(TableDataContainer.java:278) ~[cuba-web-7.2.15.jar:7.2.15]
    at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.components.data.table.DatasourceTableItems.datasourceCollectionChanged(DatasourceTableItems.java:67) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.bali.events.EventRouter.fireEvent(EventRouter.java:45) ~[cuba-global-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.data.impl.AbstractCollectionDatasource.fireCollectionChanged(AbstractCollectionDatasource.java:376) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.internalAddItem(CollectionDatasourceImpl.java:396) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.addItem(CollectionDatasourceImpl.java:369) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.data.impl.ValueCollectionDatasourceImpl.addItem(ValueCollectionDatasourceImpl.java:96) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.addon.dashboard.web.parameter.frames.EntitiesListValueFrame.saveWindowValue(EntitiesListValueFrame.java:115) ~[dashboard-web-3.2.3.jar:na]
    at com.haulmont.addon.dashboard.web.parameter.frames.EntitiesListValueFrame.lambda$openEntityValueWindow$0(EntitiesListValueFrame.java:102) ~[dashboard-web-3.2.3.jar:na]
    at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.screen.Screen.fireEvent(Screen.java:128) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.screen.Screen.close(Screen.java:343) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.addon.dashboard.web.parameter.frames.EntityValueWindow.commitAndClose(EntityValueWindow.java:52) ~[dashboard-web-3.2.3.jar:na]
    ... 50 common frames omitted
Caused by: java.lang.NullPointerException: null
    at com.haulmont.cuba.core.entity.KeyValueEntity.getValue(KeyValueEntity.java:100) ~[cuba-global-7.2.15.jar:7.2.15]
    at com.haulmont.chile.core.model.utils.InstanceUtils.getValueEx(InstanceUtils.java:134) ~[cuba-global-7.2.15.jar:7.2.15]
    at com.haulmont.chile.core.model.impl.AbstractInstance.getValueEx(AbstractInstance.java:172) ~[cuba-global-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.gui.components.data.table.DatasourceTableItems.getItemValue(DatasourceTableItems.java:119) ~[cuba-gui-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.gui.components.table.TableItemWrapper.getPropertyValue(TableItemWrapper.java:74) ~[cuba-web-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.gui.components.table.TableItemPropertyWrapper.getValue(TableItemPropertyWrapper.java:34) ~[cuba-web-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.gui.components.WebAbstractTable.formatCellValue(WebAbstractTable.java:1162) ~[cuba-web-7.2.15.jar:7.2.15]
    at com.haulmont.cuba.web.widgets.CubaTable.formatPropertyValue(CubaTable.java:355) ~[cuba-web-widgets-7.2.15.jar:na]
    at com.haulmont.cuba.web.widgets.CubaTable.getPropertyValue(CubaTable.java:271) ~[cuba-web-widgets-7.2.15.jar:na]
    at com.vaadin.v7.ui.Table.parseItemIdToCells(Table.java:2371) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    at com.vaadin.v7.ui.Table.getVisibleCellsNoCache(Table.java:2219) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    at com.vaadin.v7.ui.Table.refreshRenderedCells(Table.java:1762) ~[vaadin-compatibility-server-8.9.2-27-cuba.jar:8.9.2-27-cuba]
    ... 68 common frames omitted