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
import java.util.Set;
import javax.olap.OLAPException;
import javax.olap.cursor.Blob;
import javax.olap.cursor.Clob;
import javax.olap.cursor.CubeCursor;
import javax.olap.cursor.Date;
import javax.olap.cursor.RowDataMetaData;
import javax.olap.cursor.Time;
import javax.olap.cursor.Timestamp;
import org.eclipse.birt.data.engine.api.IBaseExpression;
import org.eclipse.birt.data.engine.api.IBinding;
import org.eclipse.birt.data.engine.core.DataException;
import org.eclipse.birt.data.engine.i18n.ResourceConstants;
import org.eclipse.birt.data.engine.olap.api.ICubeCursor;
import org.eclipse.birt.data.engine.olap.api.query.ICubeQueryDefinition;
import org.eclipse.birt.data.engine.olap.api.query.IDimensionDefinition;
import org.eclipse.birt.data.engine.olap.api.query.IHierarchyDefinition;
import org.eclipse.birt.data.engine.olap.api.query.ILevelDefinition;
import org.eclipse.birt.data.engine.olap.api.query.IMeasureDefinition;
import org.eclipse.birt.data.engine.olap.data.api.DimLevel;
import org.eclipse.birt.data.engine.olap.script.JSCubeBindingObject;
import org.eclipse.birt.data.engine.olap.script.OLAPExpressionCompiler;
import org.eclipse.birt.data.engine.olap.util.OlapExpressionCompiler;
import org.eclipse.birt.data.engine.script.ScriptEvalUtil;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
/**
 * 
 */
public class CubeCursorImpl implements ICubeCursor