Bug 122068 [Smoke][Regression]Exception thrown out when preview Chart
New a report, create a regular chart and preview. Though the chart image is generated, a ClassCastException is thrown out. The handle here actually is an ExtendedItemHandle, not an ImageHandle. ------------------------------------------------------------------------ There are errors on the report page: - There are error(s) in Chart : 580 Error0 : Error.UnhandledScriptError ( 1 time(s) ) detail : org.eclipse.birt.report.engine.api.EngineException: Unhandled exception when executing script at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:226) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:216) at org.eclipse.birt.report.engine.script.internal.ImageScriptExecutor.handleOnRender(ImageScriptExecutor.java:82) at org.eclipse.birt.report.engine.presentation.LocalizedEmitter.startExtendedContent(LocalizedEmitter.java:761) at org.eclipse.birt.report.engine.presentation.LocalizedEmitter.startExtendedContent(LocalizedEmitter.java:677) at org.eclipse.birt.report.engine.presentation.LocalizedEmitter.startForeign(LocalizedEmitter.java:447) at org.eclipse.birt.report.engine.presentation.WrappedEmitter.startForeign(WrappedEmitter.java:209) at org.eclipse.birt.report.engine.presentation.DefaultPaginationEmitter.startForeign(DefaultPaginationEmitter.java:253) at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:101) at org.eclipse.birt.report.engine.executor.ReportExecutorVisitor.visitExtendedItem(ReportExecutorVisitor.java:81) at org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept(ExtendedItemDesign.java:30) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:121) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:87) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:148) at org.eclipse.birt.report.services.ReportEngineService.runAndRenderReport(ReportEngineService.java:441) at org.eclipse.birt.report.viewer.aggregation.layout.EngineFragment.doService(EngineFragment.java:113) at org.eclipse.birt.report.viewer.aggregation.BaseFragment.service(BaseFragment.java:156) at org.eclipse.birt.report.viewer.servlet.ViewerServlet.doGet(ViewerServlet.java:172) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339) 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(Thread.java:534) Caused by: java.lang.ClassCastException at org.eclipse.birt.report.engine.script.internal.ImageScriptExecutor.getEventHandler(ImageScriptExecutor.java:89) at org.eclipse.birt.report.engine.script.internal.ImageScriptExecutor.handleOnRender(ImageScriptExecutor.java:77) ... 49 more
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/element/IDesignElement.java
* elment is contained, if any. If the element is existed in the current
	 * module,this method and <CODE>getName()</CODE> will return identical
	 * results.
	 * 
	 * @return the qualified name of thie element.
	 */
	String getQualifiedName( );
	/**
	 * Sets the name of this element. If the name is <code>null</code>, then
	 * the name is cleared if this element does not require a name.
	 * 
	 * @param name
	 *            the new name
	 * @throws ScriptException
	 *             if the name is duplicate, or if the name is <code>null</code>
	 *             and this element requires a name.
	 */
	void setName( String name ) throws ScriptException;
	String getNamedExpression( String name );
	void setNamedExpression( String name, String exp ) throws ScriptException;
	Object getUserProperty( String name );
	void setUserProperty( String name, Object value ) throws ScriptException;
	/**
	 * Return the parent of this element
	 * 
	 * @return the parent
	 */
	IDesignElement getParent( );
}