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/IReportItemGeneration.java
* @deprecated implement #init(IReportItemGenerationInfo) instead
	 */
	public void setReportQueries( IBaseQueryDefinition[] queries );
	/**
	 * processes the extended item in report generation environment.
	 * @deprecated since BIRT 2.3
	 * @param rowSets
	 *            rowSets an array of row sets that is passed to the extension
	 * @return an object that captures the generation-time state information
	 *         about the extended item. Presentation engine guarantees that the
	 *         same object is returned to the extended item instance at
	 *         presentation time. To achieve such a goal, generation engine may
	 *         uses serialization services provided by the
	 *         IReportItemSerializable interface.
	 * @throws BirtException
	 *             throws exception when there is a problem processing the
	 *             extended item
	 */
	public abstract void onRowSets( IRowSet[] rowSets ) throws BirtException;
	/**
	 * processes the extended item in report generation environment.
	 * 
	 * @param results
	 *            results is an array of query results which is passed to the
	 *            extended item. The extended item could retrieve data from
	 *            those results.
	 * @return an object that captures the generation-time state information
	 *         about the extended item. Presentation engine guarantees that the
	 *         same object is returned to the extended item instance at
	 *         presentation time. To achieve such a goal, generation engine may