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
/**
	 * sets the image formats that are supported for this output format. Formats
	 * are separated by semi-colon. For example, the argument could be
	 * JPG;PNG;BMP;SVG
	 * 
	 * @deprecated implement #init(IReportItemPresentationInfo) instead.
	 * @param supportedImageFormats
	 *            the image formats that the presentation engine could support.
	 */
	public abstract void setSupportedImageFormats( String supportedImageFormats );
	/**
	 * deserializes generation time state information about the extended item
	 * 
	 * @param istream
	 *            the input stream to deserialize generation time state from
	 */
	public void deserialize( InputStream istream );
	/**
	 * returns the output type, which could be IMAGE, TEXT, HTML TEXT, DRAWING,
	 * etc. For now, only Image is supported.
	 * 
	 * @param mimeType
	 *            an out parameter that returns the MIME type of the output
	 * @return output type, for now OUTPUT_AS_IMAGE only
	 */
	public int getOutputType( );
	/**
	 * processes the extended item in report presentation environment.
	 * @deprecated since BIRT 2.3
	 * @param rowSets