Project: Birt
Bug 273556 Exception occurs when adding aggregation into crosstab by Dnd
Reported: 2009-04-24 03:55:55 | Status: closed fixed

Description: Exception occurs when adding aggregation into crosstab by Dnd Build number: 2.5.0.v20090424-0630 Steps to reproduce: 1, New a crosstab with levels and measures 2, Dnd aggregation builder from palette into crosstab measure area 3, Specify the expressoin and click OK Expected result: No exception occurs after step3 Actual result: After step3, Exception occurred to block the creation. Error log: org.eclipse.birt.report.designer.core.runtime.GUIException: Posn: -1, List Size: 2 at org.eclipse.birt.report.designer.core.runtime.GUIException.createGUIException(GUIException.java:78) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:169) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:150) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:89) at org.eclipse.birt.report.item.crosstab.internal.ui.AggregationDropAdapter.performDrop(AggregationDropAdapter.java:124) at org.eclipse.birt.report.designer.internal.ui.dnd.DNDService.performDrop(DNDService.java:160) at org.eclipse.birt.report.designer.internal.ui.palette.DesignerPaletteFactory$2$1.performCreation(DesignerPaletteFactory.java:117) at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:178) at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1064) at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:263) at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:374) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:538) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:207) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284) Caused by: java.lang.IndexOutOfBoundsException: Posn: -1, List Size: 2 at org.eclipse.birt.report.model.command.ComplexPropertyCommand.removeItem(ComplexPropertyCommand.java:377) at org.eclipse.birt.report.model.api.PropertyHandle.removeItem(PropertyHandle.java:329) at org.eclipse.birt.report.model.api.SimpleValueHandle.removeItem(SimpleValueHandle.java:477) at org.eclipse.birt.report.item.crosstab.internal.ui.AggregationDropAdapter.performDrop(AggregationDropAdapter.java:91) ... 32 more

Files changed in fix:
xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/AggregationDropAdapter.java