Project: Birt
Bug 269952 NPE occurred when previewing crosstab without binding a cube
Reported: 2009-03-25 05:59:33 | Status: closed fixed

Description: NPE occurred when previewing crosstab without binding a cube Build number: 2.5.0.v20090325-0630 Steps to reproduce: 1, New a crosstab 2, Drag and drop a dimension into crosstab's row area 3, Modify the Binding of crosstab to None 4, Preview Expected result: Show proper exception rather than NPE Actual result: NPE occurred. Error log: Caused by: java.lang.NullPointerException at org.eclipse.birt.data.engine.olap.data.impl.Cube.load(Cube.java:130) at org.eclipse.birt.data.engine.olap.data.api.CubeQueryExecutorHelper.loadCube(CubeQueryExecutorHelper.java:149) at org.eclipse.birt.data.engine.olap.query.view.QueryExecutor.loadCube(QueryExecutor.java:366) at org.eclipse.birt.data.engine.olap.query.view.QueryExecutor.execute(QueryExecutor.java:83) at org.eclipse.birt.data.engine.olap.query.view.BirtCubeView.getCubeCursor(BirtCubeView.java:167) at org.eclipse.birt.data.engine.olap.impl.query.CubeQueryResults.getCubeCursor(CubeQueryResults.java:84) at org.eclipse.birt.report.engine.data.dte.CubeResultSet.(CubeResultSet.java:87) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteCube(DteDataEngine.java:174) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:258) at org.eclipse.birt.report.engine.executor.ExecutorManager$ExecutorContext.executeQuery(ExecutorManager.java:422) at org.eclipse.birt.report.item.crosstab.core.re.executor.BaseCrosstabExecutor.executeQuery(BaseCrosstabExecutor.java:114) at org.eclipse.birt.report.item.crosstab.core.re.executor.CrosstabReportItemExecutor.execute(CrosstabReportItemExecutor.java:102) at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:62) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46) at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:64) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:157) ... 49 more

Files changed in fix:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/i18n/ResourceConstants.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/query/view/QueryExecutor.java