Project: Birt
Bug 135825 Chart bind join data set, NPE will thrown out.
Reported: 2006-04-10 05:25:24 | Status: closed fixed

Chart bind join data set, NPE will thrown out. Steps: 1.Create a joint data set 2.Create a chart, open Chart Builder, go to "Select Data" tab 3.Select the joint data set Actual Results: 1.NPE will thrown out at: org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.switchDataSet(TaskSelectData.java:505) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.widgetSelected(TaskSelectData.java:577) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:203) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:181) org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:210) org.eclipse.birt.report.designer.internal.ui.editors.schematic.extensions.ExtendedElementToolExtends.preHandleMouseUp(ExtendedElementToolExtends.java:55) org.eclipse.birt.report.designer.internal.ui.editors.schematic.tools.ReportCreationTool.performCreation(ReportCreationTool.java:84) org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:178) org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1053) org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:259) org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:374) org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:528) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1899) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:417) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:99) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) org.eclipse.core.launcher.Main.basicRun(Main.java:282) org.eclipse.core.launcher.Main.run(Main.java:977) org.eclipse.core.launcher.Main.main(Main.java:952) Caused By:dataSource param cannot be null org.eclipse.birt.data.engine.impl.DataEngineImpl.defineDataSource(DataEngineImpl.java:137) org.eclipse.birt.chart.reportitem.ui.ChartDataSetManager.getCacheResult(ChartDataSetManager.java:219) org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvider.getPreviewRowData(ReportDataServiceProvider.java:159) org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvider.getPreviewData(ReportDataServiceProvider.java:94) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.switchDataTable(TaskSelectData.java:431) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.switchDataSet(TaskSelectData.java:495) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.widgetSelected(TaskSelectData.java:577) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:203) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:181) org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:210) org.eclipse.birt.report.designer.internal.ui.editors.schematic.extensions.ExtendedElementToolExtends.preHandleMouseUp(ExtendedElementToolExtends.java:55) org.eclipse.birt.report.designer.internal.ui.editors.schematic.tools.ReportCreationTool.performCreation(ReportCreationTool.java:84) org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:178) org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1053) org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:259) org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:374) org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:528) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1899) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:417) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:99) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) org.eclipse.core.launcher.Main.basicRun(Main.java:282) org.eclipse.core.launcher.Main.run(Main.java:977) org.eclipse.core.launcher.Main.main(Main.java:952) Expected Results: 1.Can work well.

Files changed in fix:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSetCacheManager.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceAndDataSet.java