Project: Birt
Bug 116362 [Smoke] NPE throws out when create a cascading parameter
Reported: 2005-11-14 21:55:30 | Status: closed fixed

Description: NullPointerException throws out when create a cascading parameter. Steps to reproduce: 1.Create a sqlserver datasource, the connection url is "jdbc:jtds:sqlserver://spmdb:1433/test". 2.Create a dataset, the sql statement is "select * from dbo.client", set a filter as "clientid <= 15". 3.Create a cascading parameter,bind with the dataset. select "ClientID" as the first level param, "SalesRepID" as the child level param. 4.Error message pops up. Error log: java.lang.NullPointerException at org.eclipse.birt.report.model.api.DesignElementHandle.getQualifiedName (DesignElementHandle.java:905) at org.eclipse.birt.report.designer.util.DEUtil.getDisplayLabel(DEUtil.java:265) at org.eclipse.birt.report.designer.internal.ui.views.data.providers.ParameterNodeP rovider.getNodeDisplayName(ParameterNodeProvider.java:52) at org.eclipse.birt.report.designer.internal.ui.views.ViewsTreeProvider.getText (ViewsTreeProvider.java:139) at org.eclipse.jface.viewers.StructuredViewer.buildLabel (StructuredViewer.java:1877) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:231) at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run (AbstractTreeViewer.java:85) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:621) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run (StructuredViewer.java:434) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1763) at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem (AbstractTreeViewer.java:535) at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren (AbstractTreeViewer.java:1802) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct (AbstractTreeViewer.java:1268) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct (AbstractTreeViewer.java:1275) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1245) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1201) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1188) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1264) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:1201) at org.eclipse.jface.viewers.StructuredViewer.refresh (StructuredViewer.java:1262) at org.eclipse.jface.viewers.StructuredViewer.refresh (StructuredViewer.java:1221) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewTreeViewerPage.e lementChanged(DataViewTreeViewerPage.java:317) at org.eclipse.birt.report.model.core.DesignElement.broadcast (DesignElement.java:775) at org.eclipse.birt.report.model.activity.NotificationRecordTask.doTask (NotificationRecordTask.java:197) at org.eclipse.birt.report.model.activity.ActivityRecord.performPostTasks (ActivityRecord.java:511) at org.eclipse.birt.report.model.activity.ActivityStack.execute (ActivityStack.java:347) at org.eclipse.birt.report.model.command.NameCommand.addSymbol (NameCommand.java:278) at org.eclipse.birt.report.model.command.NameCommand.addElement (NameCommand.java:231) at org.eclipse.birt.report.model.command.ContentCommand.addElementNames (ContentCommand.java:291) at org.eclipse.birt.report.model.command.ContentCommand.doAdd (ContentCommand.java:242) at org.eclipse.birt.report.model.command.ContentCommand.add (ContentCommand.java:125) at org.eclipse.birt.report.model.api.SlotHandle.add(SlotHandle.java:119) at org.eclipse.birt.report.model.api.SlotHandle.add(SlotHandle.java:78) at org.eclipse.birt.report.designer.internal.ui.dialogs.CascadingParametersDialog.o kPressed(CascadingParametersDialog.java:742) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:409) at org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDialog.buttonPressed (BaseDialog.java:273) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556) 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.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDialog.open (BaseDialog.java:145) at org.eclipse.birt.report.designer.internal.ui.views.data.providers.ParametersNode Provider.createElement(ParametersNodeProvider.java:108) at org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.createEle ment(DefaultNodeProvider.java:350) at org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performIn sert(DefaultNodeProvider.java:356) at org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performRe quest(DefaultNodeProvider.java:304) at org.eclipse.birt.report.designer.internal.ui.views.actions.InsertAction.doAction (InsertAction.java:169) at org.eclipse.birt.report.designer.internal.ui.views.actions.AbstractElementAction .run(AbstractElementAction.java:60) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:400) 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:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/views/ProviderFactory.java