Bug 179661 NPE throws out when preview the attached report [1102]
Description: NPE throws out when preview the attached report [1102] Build number: 2.2.0.v20070328-0630 Steps to reproduce: 1, Using attached report design file 2, Preview Expected result: Previewed successfully Actual result: NPE throws out when preview Error log:
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
throw new AdapterException( e.getLocalizedMessage( ) );
		}
	}
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.data.engine.api.DataEngine#defineCube(org.eclipse.birt.report.model.api.olap.CubeHandle)
	 */
	public void defineCube( CubeHandle cubeHandle ) throws BirtException
	{
		int mode = this.sessionContext.getDataEngineContext( ).getMode( );
		try
		{
			CubeMaterializer cubeMaterializer = null;
			if ( mode == DataEngineContext.DIRECT_PRESENTATION )
			{
				cubeMaterializer = new org.eclipse.birt.data.engine.olap.api.cube.CubeMaterializer( this.sessionContext.getDataEngineContext( )
						.getTmpdir( ),
						cubeHandle.getQualifiedName( ) );
				createCube( cubeHandle, cubeMaterializer );
			}
			else if ( mode == DataEngineContext.MODE_GENERATION )
			{
				cubeMaterializer = new org.eclipse.birt.data.engine.olap.api.cube.CubeMaterializer( this.sessionContext.getDataEngineContext( )
						.getTmpdir( ),
						cubeHandle.getQualifiedName( ) );
				createCube( cubeHandle, cubeMaterializer );
				cubeMaterializer.saveCubeToReportDocument( cubeHandle.getQualifiedName( ),
						this.sessionContext.getDocumentWriter( ),