Bug 137149 Setting an alias on a column belonging to the scripted datasource, an error is thrown out
Description: Setting an alias on a column belonging to the scripted datasource, an error is thrown out Steps to reproduce: 1. new a scripted datasource and create a dataset based on it 2. set an alias on some column 3. Save and preview Actual Results: Error0 : Error.ScriptEvaluationError ( 50 time(s) ) detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "row["a"]". at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:520) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:482) at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:98) at org.eclipse.birt.report.engine.executor.ReportExecutorVisitor.visitDataItem(ReportExecutorVisitor.java:158) at org.eclipse.birt.report.engine.ir.DataItemDesign.accept(DataItemDesign.java:69) at org.eclipse.birt.report.engine.executor.TableItemExecutor.accessRow(TableItemExecutor.java:606) at org.eclipse.birt.report.engine.executor.TableItemExecutor.accessTableBand(TableItemExecutor.java:502) at org.eclipse.birt.report.engine.executor.TableItemExecutor.accessDetail(TableItemExecutor.java:418) at org.eclipse.birt.report.engine.executor.ListingElementExecutor.accessQuery(ListingElementExecutor.java:125) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:151) at org.eclipse.birt.report.engine.executor.ReportExecutorVisitor.visitTableItem(ReportExecutorVisitor.java:188) at org.eclipse.birt.report.engine.ir.TableItemDesign.accept(TableItemDesign.java:69) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:125) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:89) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:171) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(Unknown Source) at org.eclipse.birt.report.presentation.aggregation.BaseFragment.service(Unknown Source) at org.eclipse.birt.report.servlet.ViewerServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.eclipse.tomcat.internal.EclipseErrorReportValve.invoke(EclipseErrorReportValve.java:153) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source)Caused by: org.mozilla.javascript.EvaluatorException: Can't find the column: a at org.eclipse.birt.report.engine.data.dte.NativeRowObject.get(NativeRowObject.java:67) at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1263) at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1301) at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1283) at org.mozilla.javascript.gen.c370._c0(<inline>:1) at org.mozilla.javascript.gen.c370.call(<inline>) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769) at org.mozilla.javascript.gen.c370.call(<inline>) at org.mozilla.javascript.gen.c370.exec(<inline>) at org.eclipse.birt.core.script.ScriptContext.eval(ScriptContext.java:224) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:513) ... 52 more
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedScriptDSQuery.java
import org.eclipse.birt.data.engine.executor.ResultObject;
import org.eclipse.birt.data.engine.i18n.ResourceConstants;
import org.eclipse.birt.data.engine.odi.ICandidateQuery;
import org.eclipse.birt.data.engine.odi.ICustomDataSet;
import org.eclipse.birt.data.engine.odi.IDataSource;
import org.eclipse.birt.data.engine.odi.IEventHandler;
import org.eclipse.birt.data.engine.odi.IQuery;
import org.eclipse.birt.data.engine.odi.IResultClass;
import org.eclipse.birt.data.engine.odi.IResultIterator;
import org.eclipse.birt.data.engine.odi.IResultObject;
/**
 * A prepared query which uses a Script Data Source.
 */
class PreparedScriptDSQuery extends PreparedDataSourceQuery
		implements
			IPreparedQuery
{
	/**
	 * @param dataEngine
	 * @param queryDefn
	 * @param dataSetDesign
	 * @param appContext
	 * @throws DataException
	 */
	PreparedScriptDSQuery( DataEngineImpl dataEngine, IQueryDefinition queryDefn, 
			IBaseDataSetDesign dataSetDesign, Map appContext ) throws DataException
	{
		super( dataEngine, queryDefn, dataSetDesign, appContext );
		logger.logp( Level.FINER,
				PreparedScriptDSQuery.class.getName( ),