Project: Birt
Bug 107961 NullPointerException is thrown out when dragging a data set from data explorer view into layout view in an old design file.
Reported: 2005-08-25 01:35:02 | Status: closed fixed

Description: NullPointerException is thrown out when double click on a data set in an old design file. Steps to reproduce: 1. Open attached design file. 2. Drag "DSet_Oracle" from data explorer view into layout view. Actual result: NPE is thrown out. java.lang.NullPointerException at org.eclipse.birt.report.data.oda.jdbc.Connection.newQuery (Connection.java:90) at org.eclipse.birt.data.engine.odaconsumer.manager.OdaConnection.newQuery (OdaConnection.java:464) at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery (Connection.java:217) at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement (Connection.java:155) at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement (DataSource.java:187) at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare (DataSourceQuery.java:290) at org.eclipse.birt.data.engine.impl.PreparedExtendedDSQuery$ExtendedDSQueryExecut or.prepareOdiQuery(PreparedExtendedDSQuery.java:253) at org.eclipse.birt.data.engine.impl.PreparedQuery$Executor.prepareExecution (PreparedQuery.java:493) at org.eclipse.birt.data.engine.impl.PreparedQuery$Executor.access$000 (PreparedQuery.java:382) at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare (PreparedQuery.java:167) at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute (PreparedDataSourceQuery.java:137) at org.eclipse.birt.report.designer.internal.ui.util.DataSetManager.execute (DataSetManager.java:239) at org.eclipse.birt.report.designer.internal.ui.util.DataSetManager.getColumns (DataSetManager.java:191) at org.eclipse.birt.report.designer.internal.ui.util.DataSetManager.getColumns (DataSetManager.java:132) at org.eclipse.birt.report.designer.internal.ui.dnd.InsertInLayoutUtil.performInse rtDataSet(InsertInLayoutUtil.java:599) at org.eclipse.birt.report.designer.internal.ui.dnd.InsertInLayoutUtil.performInse rt(InsertInLayoutUtil.java:391) at org.eclipse.birt.report.designer.internal.ui.dnd.InsertInLayoutUtil.performMult iInsert(InsertInLayoutUtil.java:485) at org.eclipse.birt.report.designer.internal.ui.dnd.InsertInLayoutUtil.performInse rt(InsertInLayoutUtil.java:410) at org.eclipse.birt.report.designer.internal.ui.dnd.InsertInLayoutUtil.performInse rt(InsertInLayoutUtil.java:441) at org.eclipse.birt.report.designer.internal.ui.palette.BasePaletteFactory$DataSet ToolExtends.preHandleMouseUp(BasePaletteFactory.java:532) at org.eclipse.birt.report.designer.internal.ui.palette.ReportTemplateTransferDrop TargetListener.handleDrop(ReportTemplateTransferDropTargetListener.java:176) at org.eclipse.gef.dnd.AbstractTransferDropTargetListener.drop (AbstractTransferDropTargetListener.java:170) at org.eclipse.jface.util.DelegatingDropAdapter$3.run (DelegatingDropAdapter.java:211) 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.util.DelegatingDropAdapter.drop (DelegatingDropAdapter.java:209) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:65) 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.dnd.DropTarget.notifyListeners(DropTarget.java:480) at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:405) at org.eclipse.swt.dnd.DropTarget.access$7(DropTarget.java:350) at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:236) at org.eclipse.swt.internal.ole.win32.COMObject.callback6 (COMObject.java:117) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:277) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:267) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:161) 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(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)

Files changed in fix:
data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/Connection.java