Bug 150170 Cannot get column type for a chart
I opened an old report from a previous version, and after conversion, I get this error trying to view my chart: $NO-RB$ Cannot get the type for column: 1 Cannot get column type. SQL error #1: null Stack trace is: org.eclipse.birt.chart.exception.ChartException at: org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvider.getPreviewRowData(ReportDataServiceProvider.java:231) org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvider.getPreviewData(ReportDataServiceProvider.java:117) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.switchDataTable(TaskSelectData.java:431) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.init(TaskSelectData.java:364) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.createControl(TaskSelectData.java:118) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.switchTask(WizardBase.java:712) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.switchTo(WizardBase.java:219) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.switchTo(ChartWizard.java:216) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.initializeBounds(WizardBase.java:578) org.eclipse.jface.window.Window.create(Window.java:430) org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.create(WizardBase.java:594) org.eclipse.jface.window.Window.open(Window.java:785) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:96) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:203) org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:221) org.eclipse.birt.report.designer.internal.ui.extension.ExtendedEditPart.performDirectEdit(ExtendedEditPart.java:153) org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.performRequest(ReportElementEditPart.java:126) org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:187) org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:131) org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:944) org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:501) org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:204) org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:285) org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:508) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:141) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) org.eclipse.core.launcher.Main.basicRun(Main.java:280) org.eclipse.core.launcher.Main.run(Main.java:977) org.eclipse.core.launcher.Main.main(Main.java:952) Caused By:null org.gjt.mm.mysql.jdbc2.ResultSetMetaData.getColumnClassName(ResultSetMetaData.java:77) org.eclipse.birt.report.data.oda.jdbc.ResultSetMetaData.getColumnTypeForSpecialJDBCDriver(ResultSetMetaData.java:175) org.eclipse.birt.report.data.oda.jdbc.ResultSetMetaData.getColumnType(ResultSetMetaData.java:148) org.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSetMetaData.getColumnType(OdaResultSetMetaData.java:159) org.eclipse.birt.data.engine.odaconsumer.ResultSetMetaData.doGetNativeColumnType(ResultSetMetaData.java:204) org.eclipse.birt.data.engine.odaconsumer.ResultSetMetaData.getColumnType(ResultSetMetaData.java:153) org.eclipse.birt.data.engine.odaconsumer.ResultSetMetaData.getColumnTypeAsJavaClass(ResultSetMetaData.java:224) org.eclipse.birt.data.engine.odaconsumer.ProjectedColumns.<init>(ProjectedColumns.java:55) org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.doGetProjectedColumns(PreparedStatement.java:400) org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getProjectedColumns(PreparedStatement.java:340) org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.declareCustomColumn(PreparedStatement.java:1079) org.eclipse.birt.data.engine.executor.DataSourceQuery.addCustomFields(DataSourceQuery.java:379) org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:255) org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:271) org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:226) org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:366) org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:139) org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:122) org.eclipse.birt.report.data.adapter.impl.QueryExecutionHelper.executeQuery(QueryExecutionHelper.java:106) org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.executeQuery(DataRequestSessionImpl.java:190) org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvider.getPreviewRowData(ReportDataServiceProvider.java:193) org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvider.getPreviewData(ReportDataServiceProvider.java:117) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.switchDataTable(TaskSelectData.java:431) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.init(TaskSelectData.java:364) org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.createControl(TaskSelectData.java:118) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.switchTask(WizardBase.java:712) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.switchTo(WizardBase.java:219) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.switchTo(ChartWizard.java:216) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.initializeBounds(WizardBase.java:578) org.eclipse.jface.window.Window.create(Window.java:430) org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase$WizardBaseDialog.create(WizardBase.java:594) org.eclipse.jface.window.Window.open(Window.java:785) org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase.open(WizardBase.java:96) org.eclipse.birt.chart.ui.swt.wizard.ChartWizard.open(ChartWizard.java:203) org.eclipse.birt.chart.reportitem.ui.ChartReportItemBuilderImpl.open(ChartReportItemBuilderImpl.java:221) org.eclipse.birt.report.designer.internal.ui.extension.ExtendedEditPart.performDirectEdit(ExtendedEditPart.java:153) org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.performRequest(ReportElementEditPart.java:126) org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:187) org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:131) org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:944) org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:501) org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:204) org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:285) org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:508) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:141) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) org.eclipse.core.launcher.Main.basicRun(Main.java:280) org.eclipse.core.launcher.Main.run(Main.java:977) org.eclipse.core.launcher.Main.main(Main.java:952)
data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ResultSetMetaData.java
throw new JDBCException( ResourceConstants.DRIVER_NO_RESULTSETMETADATA,
					ResourceConstants.ERROR_NO_RESULTSETMETADATA );
		}
	}
	/**
	 * 
	 * Constructor ResultSetMetaData(java.sql.ResultSetMetaData rsMeta) use
	 * JDBC's ResultSetMetaData to construct it.
	 *  
	 */
	public ResultSetMetaData( java.sql.ResultSetMetaData rsMeta )
			throws OdaException
	{
		
		this.rsMetadata = rsMeta;
	}
	/*
	 * @see org.eclipse.datatools.connectivity.IResultSetMetaData#getColumnCount()
	 */
	public int getColumnCount( ) throws OdaException
	{
		logger.logp( java.util.logging.Level.FINE,
				ResultSetMetaData.class.getName( ),
				"getColumnCount",
				"ResultSetMetaData.getColumnCount( )" );
		assertNotNull( rsMetadata );
		try
		{
			
			return rsMetadata.getColumnCount( );