Bug 210617 NPE occurrs when using report item which is involved with subquery
Build ID: I20071101-2000 Steps To Reproduce: 1. New a datasource and dataset 2. New a table named table1 and binding the dataset. 3. Add a chart in table and set the x and y series. 4. Add some item in layout and binding the result set as table1. Actual reuslt: Preview this report will cause an NPE Since report item sharing is not used in a report item involved with subquery, dte will throw out DataException will a message in CacheResultIterator.getSecondaryIterator(String, Scriptable) to indicate the user this kind of behavior is not valid. In the invoker method like AbstractDataEngine.doExecuteSubQuery(QueryResultSet, ISubqueryDefinition), however, DataException will be caught and then return null to the upper layer, which will raise an NullPointerException. So engine should change the way handling the DataException to display the indicating message properly.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExtendedGenerateExecutor.java
* @param in
	 *            input content
	 * @return content in the stream.
	 */
	static protected byte[] readContent( InputStream in )
	{
		BufferedInputStream bin = in instanceof BufferedInputStream
				? (BufferedInputStream) in
				: new BufferedInputStream( in );
		ByteArrayOutputStream out = new ByteArrayOutputStream( 1024 );
		byte[] buffer = new byte[1024];
		int readSize = 0;
		try
		{
			readSize = bin.read( buffer );
			while ( readSize != -1 )
			{
				out.write( buffer, 0, readSize );
				readSize = bin.read( buffer );
			}
		}
		catch ( IOException ex )
		{
			logger.log( Level.SEVERE, ex.getMessage( ), ex );
		}
		return out.toByteArray( );
	}
	protected void executeQueries( )
	{
		ExtendedItemDesign extItem = (ExtendedItemDesign) design;