Project: Birt
Bug 115417 NPE thrown out when new a data source after insert a chart to library
Reported: 2005-11-07 21:58:08 | Status: closed fixed

description: NPE thrown out when new a data source after insert a chart to library steps to reproduce: 1.drag a chart to library 2.click ok to close chart builder 3.set chart name to be "chart1" in property editor 4.new a data source actual result: NPE thrown out expected result: No exception thrown out exception stack trace: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:2942) at org.eclipse.swt.SWT.error(SWT.java:2865) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) Caused by: java.lang.NullPointerException at org.eclipse.birt.report.designer.ui.views.attributes.AtrributesBuilder.isSameTy pe(AtrributesBuilder.java:239) at org.eclipse.birt.report.designer.ui.views.attributes.AtrributesBuilder.getPageG enerator(AtrributesBuilder.java:80) at org.eclipse.birt.report.designer.ui.views.attributes.AtrributesBuilder.createPa ges(AtrributesBuilder.java:67) at org.eclipse.birt.report.designer.ui.views.attributes.AttributeView.resetTabFold er(AttributeView.java:235) at org.eclipse.birt.report.designer.ui.views.attributes.AttributeView.handleSelect ionChanged(AttributeView.java:455) at org.eclipse.birt.report.designer.ui.views.attributes.AttributeView.performReque st(AttributeView.java:425) at org.eclipse.birt.report.designer.core.util.mediator.ReportMediator.notifyReques t(ReportMediator.java:128) at org.eclipse.birt.report.designer.internal.ui.editors.parts.DeferredGraphicalVie wer$1.run(DeferredGraphicalViewer.java:337) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:123) ... 18 more

Files changed in fix:
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ElementFactory.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/elements/table/LayoutSlot.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/GroupElement.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/TableItem.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/ModuleReader.java