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
*            rowSets an array of row sets that is passed to the extension
	 * @return the returned value could be different depending on the type of
	 *         the output. For image, returns an input stream or byte array that
	 *         the engine could retrieve data from
	 * @throws BirtException
	 *             throws exception when there is a problem processing the
	 *             extended item
	 */
	public abstract Object onRowSets( IRowSet[] rowSets ) throws BirtException;
	/**
	 * Process the extended item. It is called in render time.
	 * 
	 * @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 The returned value could be different depending on the type of
	 *         the output. For image, returns an input stream or byte array.
	 * @throws BirtException
	 *             Throws exception when there is a problem processing the
	 *             extended item
	 */
	public abstract Object onRowSets( IBaseResultSet[] results )
			throws BirtException;
	
	/**
	 * Get the size of the extended item. The size is a Dimension object. The
	 * width and height can only be in absolute units (inch, mm, etc.) or pixel.
	 * It can not be a relative size such as 150% or 1.2em. Notice that an
	 * extended item can obtain its design-time size information by querying DE.