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
*         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( IBaseResultSet[] results )
			throws BirtException;
	
	/**
	 * returns whether the extended item needs serialization of state
	 * information at generation time
	 * 
	 * @return whether the extended item needs to serialize state information at
	 *         generation time
	 */
	public abstract boolean needSerialization( );
	/**
	 * serializes the extended item generation time state. The application
	 * developer should not assume that the output stream is a file stream.
	 * Presentation engine guarantees that a corresponding input stream is
	 * available for deserializing what is written by this function.
	 * 
	 * @param ostream
	 *            the output stream to write the generation time state of the
	 *            extended item to
	 * @throws BirtException
	 *             when there is a problem serializing the extended item state
	 */
	public abstract void serialize( OutputStream ostream ) throws BirtException;