Bug 200755 [smoke]Fail to preview Crosstab after deploy BIRT in application servers.[0601][1102]
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ServiceForQueryResults.java
{
			Iterator it = aggrRefs.iterator( );
			int groupLevel = -1;
			while( it.hasNext( ) )
			{
				IAggrInfo aggr = (IAggrInfo) it.next( );
				if ( groupLevel == -1 )
					groupLevel = aggr.getGroupLevel( );
				if( groupLevel!= aggr.getGroupLevel( ))
					throw new DataException( ResourceConstants.INVALID_AGGR_PARAMETER, aggr.getName( ));
			}
			return groupLevel;
		}
		/**
		 * Sort the aggregation definition list according to their calculation level.
		 * @param aggrDefns
		 */
		private void sortAggrDefnsAccordingToCalLvl( List aggrDefns )
		{
			Collections.sort( aggrDefns, new Comparator( ) {
				public int compare( Object o1, Object o2 )
				{
					assert o1 instanceof IAggrInfo;
					assert o2 instanceof IAggrInfo;
					int round1 = ( (IAggrInfo) o1 ).getRound( );
					int round2 = ( (IAggrInfo) o2 ).getRound( );
					if ( round1 == round2 )
						return 0;
					if ( round1 > round2 )
						return 1;