Bug 189848 NPE throws out when preview a crosstab has one dimension [1102]
Description: NPE throws out when preview a crosstab has one dimension [1102] Build number: 2.2.0.v20070530-0630 Steps to reproduce: 1, New a crosstab 2, Drag a dimension into row or column area 3, Drag a measure into detail area 4, Preview Expected result: Preview successfully Actual result: NPE throws out Error log: org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report; nested exception is: java.lang.NullPointerException Show Exception Stack Trace Hide Exception Stack Trace Stack Trace: org.eclipse.birt.data.engine.olap.impl.query.CubeCursorImpl.populateLevel(CubeCursorImpl.java:132) org.eclipse.birt.data.engine.olap.impl.query.CubeCursorImpl.validateBindings(CubeCursorImpl.java:102) org.eclipse.birt.data.engine.olap.impl.query.CubeCursorImpl.(CubeCursorImpl.java:70) org.eclipse.birt.data.engine.olap.impl.query.CubeQueryResults.getCubeCursor(CubeQueryResults.java:75) org.eclipse.birt.report.engine.data.dte.CubeResultSet.(CubeResultSet.java:78) org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteCube(DteDataEngine.java:234) org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:120) org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/impl/query/CubeCursorImpl.java
"measure" );
			if ( measureName != null && !validMeasures.contains( measureName ) )
				throw new DataException( ResourceConstants.INVALID_BINDING_REFER_TO_INEXIST_MEASURE,
						binding.getBindingName( ) );
			if ( binding.getAggregatOns( ).size( ) > 0
					&& binding.getAggrFunction( ) == null )
				throw new DataException( ResourceConstants.INVALID_BINDING_MISSING_AGGR_FUNC,
						binding.getBindingName( ) );
		}
	}
	/**
	 * 
	 * @param validDimLevels
	 * @param edgeType
	 */
	private void populateLevel( Set validDimLevels, int edgeType )
	{
		for( int i = 0; i < this.queryDefn.getEdge( edgeType ).getDimensions( ).size( ); i++ )
		{
			for( int j = 0; j < getHierarchy( edgeType, i ).getLevels( ).size( );j++)
			{
				ILevelDefinition level = (ILevelDefinition)getHierarchy( edgeType, i ).getLevels( ).get( j );
				validDimLevels.add( new DimLevel( this.getDimension( edgeType, i ).getName( ), level.getName( )) );
			}
		}
	}
	/**
	 * 
	 * @param edgeType
	 * @param i