created an attachment (id=157860)
report

description:
stored procedure name lead exception in stored procedure query dataset [0703]

build:
2.5.2.v20100201-0630

steps to reproduce:
1. add a data source: net.sourceforge.jtds.jdbc.driver (v1.1); jdbc:jtds:sqlserver://shanghai:1433/test;domain=shanghai; test; dbuser1. 
2. add a data set, select data set type "sql stored procedure query". 
3. find stored procedure "example;1" under dbo.
4. double click "example;1" to add it to query aera, "{call example;1(?)}"
5. click finish and exception thrown out
6. if modify "{call example;1(?)}" to "{call example(?)}", no exception

actual result:
exception thrown out

expect result:
no error, or "example;1" inserted as "example"

error log:
org.eclipse.birt.data.engine.core.dataexception: cannot set a null value to parameter 1.
cannot set preparedstatement null value.
sql error #1: invalid parameter index 1.

at org.eclipse.birt.data.engine.odaconsumer.preparedstatement.handleexception(preparedstatement.java:4835)
at org.eclipse.birt.data.engine.odaconsumer.preparedstatement.dosetnull(preparedstatement.java:4763)
at org.eclipse.birt.data.engine.odaconsumer.preparedstatement.setnull(preparedstatement.java:4285)
at org.eclipse.birt.data.engine.odaconsumer.preparedstatement.setparametervalue(preparedstatement.java:3214)
at org.eclipse.birt.data.engine.odaconsumer.preparedstatement.setparametervalue(preparedstatement.java:3171)
at org.eclipse.birt.data.engine.executor.datasourcequery.setinputparameterbinding(datasourcequery.java:947)
at org.eclipse.birt.data.engine.executor.datasourcequery.addparameterdefns(datasourcequery.java:530)
at org.eclipse.birt.data.engine.executor.datasourcequery.prepare(datasourcequery.java:283)
at org.eclipse.birt.data.engine.impl.preparedodadsquery$odadsqueryexecutor.prepareodiquery(preparedodadsquery.java:412)
at org.eclipse.birt.data.engine.impl.queryexecutor.prepareexecution(queryexecutor.java:337)
at org.eclipse.birt.data.engine.impl.preparedquery.doprepare(preparedquery.java:448)
at org.eclipse.birt.data.engine.impl.prepareddatasourcequery.producequeryresults(prepareddatasourcequery.java:190)
at org.eclipse.birt.data.engine.impl.prepareddatasourcequery.execute(prepareddatasourcequery.java:178)
at org.eclipse.birt.data.engine.impl.preparedodadsquery.execute(preparedodadsquery.java:144)
at org.eclipse.birt.data.engine.impl.prepareddatasourcequery.execute(prepareddatasourcequery.java:159)
at org.eclipse.birt.data.engine.impl.prepareddatasourcequery.execute(prepareddatasourcequery.java:142)
at org.eclipse.birt.report.data.adapter.impl.queryexecutionhelper.executequery(queryexecutionhelper.java:129)
at org.eclipse.birt.report.data.adapter.impl.queryexecutionhelper.executequery(queryexecutionhelper.java:111)
at org.eclipse.birt.report.data.adapter.impl.queryexecutionhelper.executequery(queryexecutionhelper.java:95)
at org.eclipse.birt.report.data.adapter.impl.datasetmetadatahelper.getruntimemetadata(datasetmetadatahelper.java:161)
at org.eclipse.birt.report.data.adapter.impl.datasetmetadatahelper.getrealmetadata(datasetmetadatahelper.java:143)
at org.eclipse.birt.report.data.adapter.impl.datasetmetadatahelper.getdatasetmetadata(datasetmetadatahelper.java:105)
at org.eclipse.birt.report.data.adapter.impl.datarequestsessionimpl.getdatasetmetadata(datarequestsessionimpl.java:197)
at org.eclipse.birt.report.designer.data.ui.util.datasetprovider.populatealloutputcolumns(datasetprovider.java:202)
at org.eclipse.birt.report.designer.data.ui.dataset.outputcolumnspage.populateoutputcolums(outputcolumnspage.java:362)
at org.eclipse.birt.report.designer.data.ui.dataset.outputcolumnspage.updateoutputcolumns(outputcolumnspage.java:309)
at org.eclipse.birt.report.designer.data.ui.dataset.outputcolumnspage.pageactivated(outputcolumnspage.java:212)
at org.eclipse.birt.report.designer.data.ui.property.abstractpropertydialog.showpage(abstractpropertydialog.java:575)
at org.eclipse.birt.report.designer.data.ui.property.abstractpropertydialog.showselectionpage(abstractpropertydialog.java:472)
at org.eclipse.birt.report.designer.data.ui.dataset.dataseteditor.showselectionpage(dataseteditor.java:895)
at org.eclipse.birt.report.designer.data.ui.property.abstractpropertydialog$2$1.run(abstractpropertydialog.java:430)
at org.eclipse.swt.custom.busyindicator.showwhile(busyindicator.java:70)
at org.eclipse.birt.report.designer.data.ui.property.abstractpropertydialog$2.selectionchanged(abstractpropertydialog.java:425)
at org.eclipse.jface.viewers.viewer$2.run(viewer.java:162)
at org.eclipse.core.runtime.saferunner.run(saferunner.java:42)
at org.eclipse.core.runtime.platform.run(platform.java:888)
at org.eclipse.ui.internal.jfaceutil$1.run(jfaceutil.java:48)
at org.eclipse.jface.util.saferunnable.run(saferunnable.java:175)
at org.eclipse.jface.viewers.viewer.fireselectionchanged(viewer.java:160)
at org.eclipse.jface.viewers.structuredviewer.updateselection(structuredviewer.java:2132)
at org.eclipse.jface.viewers.structuredviewer.setselection(structuredviewer.java:1669)
at org.eclipse.jface.viewers.treeviewer.setselection(treeviewer.java:1124)
at org.eclipse.jface.viewers.viewer.setselection(viewer.java:392)
at org.eclipse.birt.report.designer.data.ui.property.abstractpropertydialog.inittreeselection(abstractpropertydialog.java:401)
at org.eclipse.birt.report.designer.data.ui.property.abstractpropertydialog.createdialogarea(abstractpropertydialog.java:292)
at org.eclipse.birt.report.designer.data.ui.dataset.dataseteditor.createdialogarea(dataseteditor.java:121)
at org.eclipse.jface.dialogs.dialog.createcontents(dialog.java:760)
at org.eclipse.birt.report.designer.data.ui.dataset.dataseteditor.createcontents(dataseteditor.java:594)
at org.eclipse.jface.window.window.create(window.java:431)
at org.eclipse.jface.dialogs.dialog.create(dialog.java:1089)
at org.eclipse.birt.report.designer.ui.dialogs.basedialog.open(basedialog.java:100)
at org.eclipse.birt.report.designer.data.ui.actions.newdatasetaction.editdataset(newdatasetaction.java:237)
at org.eclipse.birt.report.designer.data.ui.actions.newdatasetaction.createnewdataset(newdatasetaction.java:196)
at org.eclipse.birt.report.designer.data.ui.actions.newdatasetaction.run(newdatasetaction.java:181)
at org.eclipse.jface.action.action.runwithevent(action.java:498)
at org.eclipse.jface.action.actioncontributionitem.handlewidgetselection(actioncontributionitem.java:584)
at org.eclipse.jface.action.actioncontributionitem.access$2(actioncontributionitem.java:501)
at org.eclipse.jface.action.actioncontributionitem$5.handleevent(actioncontributionitem.java:411)
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:3897)
at org.eclipse.swt.widgets.display.readanddispatch(display.java:3490)
at org.eclipse.ui.internal.workbench.runeventloop(workbench.java:2405)
at org.eclipse.ui.internal.workbench.runui(workbench.java:2369)
at org.eclipse.ui.internal.workbench.access$4(workbench.java:2221)
at org.eclipse.ui.internal.workbench$5.run(workbench.java:500)
at org.eclipse.core.databinding.observable.realm.runwithdefault(realm.java:332)
at org.eclipse.ui.internal.workbench.createandrunworkbench(workbench.java:493)
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(nativemethodaccessorimpl.java:39)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)
at java.lang.reflect.method.invoke(method.java:585)
at org.eclipse.equinox.launcher.main.invokeframework(main.java:559)
at org.eclipse.equinox.launcher.main.basicrun(main.java:514)
at org.eclipse.equinox.launcher.main.run(main.java:1311)
caused by: org.eclipse.birt.report.data.oda.jdbc.jdbcexception: cannot set preparedstatement null value.
sql error #1: invalid parameter index 1.
;
java.sql.sqlexception: invalid parameter index 1.
at org.eclipse.birt.report.data.oda.jdbc.callstatement.setnull(callstatement.java:1141)
at org.eclipse.datatools.connectivity.oda.consumer.helper.odaquery.setnull(odaquery.java:1207)
at org.eclipse.birt.data.engine.odaconsumer.preparedstatement.dosetnull(preparedstatement.java:4758)
... 80 more
caused by: java.sql.sqlexception: invalid parameter index 1.
at net.sourceforge.jtds.jdbc.jtdspreparedstatement.getparameter(jtdspreparedstatement.java:239)
at net.sourceforge.jtds.jdbc.jtdspreparedstatement.setparameter(jtdspreparedstatement.java:311)
at net.sourceforge.jtds.jdbc.jtdspreparedstatement.setnull(jtdspreparedstatement.java:452)
at org.eclipse.birt.report.data.oda.jdbc.callstatement.setnull(callstatement.java:1132)
... 82 more
this bug has been fixed now.
verify the bug.