Project: Birt
Bug 117839 NPE thrown out when the cascading parameter reference an empty xml data set
Reported: 2005-11-24 01:33:35 | Status: closed fixed

description: NPE thrown out when the cascading parameter reference an empty xml data set steps to reproduce: 1. create a xml data set which result set is empty 2. create a cascading parameter to bind the xml data set 3. insert a cascading parameter to layout view 4. preview actual result: NPE thrown out exception stack trace: java.lang.NullPointerException at org.eclipse.birt.data.engine.impl.ResultIterator.groupKeyValuesEqual(ResultIterator.java:919) at org.eclipse.birt.data.engine.impl.ResultIterator.findGroup(ResultIterator.java:891) at org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.getSelectionListForCascadingGroup(GetParameterDefinitionTask.java:639) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.getSelectionChoice(InputParameterDialog.java:645) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.buildChoiceList(InputParameterDialog.java:552) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.rendParameterComboBox(InputParameterDialog.java:506) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.rendScalarParameter(InputParameterDialog.java:357) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.renderParameterWidgets(InputParameterDialog.java:219) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.renderParameterWidgets(InputParameterDialog.java:214) at org.eclipse.birt.report.designer.internal.ui.dialogs.InputParameterDialog.createDialogArea(InputParameterDialog.java:173) at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:687) at org.eclipse.jface.window.Window.create(Window.java:418) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:996) at org.eclipse.birt.report.designer.internal.ui.editors.parts.AbstractMultiPageLayoutEditor.prePreview(AbstractMultiPageLayoutEditor.java:1104) at org.eclipse.birt.report.designer.internal.ui.editors.parts.AbstractMultiPageLayoutEditor.pageChange(AbstractMultiPageLayoutEditor.java:954) at org.eclipse.birt.report.designer.ui.editors.ReportEditor.pageChange(ReportEditor.java:170) at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:200) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:867) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:660) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3138) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1922) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)

Files changed in fix:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ResultIterator.java