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
this.scope.put( "data", this.scope, new JSCubeBindingObject( this ));
	}
	
	/**
	 * 
	 * @throws DataException
	 */
	private void validateBindings( ) throws DataException
	{
		Set validMeasures = new HashSet();
		for( int i = 0; i < this.queryDefn.getMeasures( ).size( ); i++ )
		{
			IMeasureDefinition measure = (IMeasureDefinition) this.queryDefn.getMeasures( ).get( i );
			validMeasures.add( measure.getName( ) );
		}
		
		Set validDimLevels = new HashSet();
		populateLevel( validDimLevels, ICubeQueryDefinition.COLUMN_EDGE );
		populateLevel( validDimLevels, ICubeQueryDefinition.ROW_EDGE );
		
		for( int i = 0; i < this.queryDefn.getBindings( ).size( ); i++ )
		{
			IBinding binding = (IBinding)this.queryDefn.getBindings( ).get(i);
			Set levels = OlapExpressionCompiler.getReferencedDimLevel( binding.getExpression( ), this.queryDefn.getBindings( ) );
			if( ! validDimLevels.containsAll( levels ))
				throw new DataException( ResourceConstants.INVALID_BINDING_REFER_TO_INEXIST_DIMENSION,
						binding.getBindingName( ) );
			
			String measureName = OlapExpressionCompiler.getReferencedScriptObject( binding.getExpression( ),