Bug 211175 ClassCastException thrown when implementing IReportItemQuery
When implementing IReportItemQuery's method, public IDataQueryDefinition[] createReportQueries(IDataQueryDefinition parent) throws BirtException, even if the impl method returns IDataQueryDefinition[], ClassCastException will be thrown during preview, the error log is as follows: java.lang.ClassCastException: [Lorg.eclipse.birt.data.engine.api.IDataQueryDefinition; at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.generateContent(ExtendedGenerateExecutor.java:91) at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:72) at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:60) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) If the method returns IBaseQueryDefinition[], it's ok. Look at the engine code, there's something wrong of class casting when generating content.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/IReportItemPresentation.java
* dynamically creates an object with type IReportItemPresentation.
 * <li> The presentation engine calls various setXXX methods to pass
 * initialization parameters to the extension implementation.
 * <li> deserialize method restores the generation time state
 * <li> Render the extended item through onRowSets method, handled the returned
 * image
 * <li> Call finish() for cleanup.
 */
public interface IReportItemPresentation
{
	public static int OUTPUT_NONE = 0;
	public static int OUTPUT_AS_IMAGE = 1; 
											
	public static int OUTPUT_AS_TEXT = 2;
	public static int OUTPUT_AS_HTML_TEXT = 3;
	public static int OUTPUT_AS_DRAWING = 4;
	public static int OUTPUT_AS_CUSTOM = 5;
	public static int OUTPUT_AS_IMAGE_WITH_MAP = 6;
	/**
	 * @since BIRT 2.3
	 * @param info Presentation info of report item
	 */
	public abstract void init( IReportItemPresentationInfo info );
	
	/**
	 * passes a handle to the extended report item model to the extension
	 * 
	 * @deprecated implement #init(IReportItemPresentationInfo) instead
	 * @param modelHandle
	 *            a handle to the extended item model object