Bug 203690 Exception occurs when preview a report which includes a library crosstab and a crosstab using library cube[1102]
Description: Exception occurs when preview a report which includes a library crosstab and a crosstab using library cube Build number: 2.2.1.v20070918-0630 Steps to reproduce: 1, New a cube in a rptlibrary 2, Publish the library 3, New a report design include a crosstab(crosstab_lib) which is using the cube from that library 4, Go back the library and new a crosstab 5, Refresh the library in report design and drag the crosstab_lib from rptlibrary. 6, Preview the report Expected result: The two crosstab are preview successfully Actual result: Only the first crosstab can be preview but the second is failed to preview and exception occurs Error log: Crosstab contains null measure defintion or the specific measure "null" doest not exist in associated cube. ( 1 time(s) ) detail : org.eclipse.birt.report.item.crosstab.core.CrosstabException: Crosstab contains null measure defintion or the specific measure "null" doest not exist in associated cube. at org.eclipse.birt.report.item.crosstab.core.util.CrosstabQueryUtil.createCubeQuery(CrosstabQueryUtil.java:112) at org.eclipse.birt.report.item.crosstab.core.re.CrosstabReportItemQuery.createReportQueries(CrosstabReportItemQuery.java:89) at org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder$QueryBuilderVisitor.visitExtendedItem(ReportQueryBuilder.java:612) at org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept(ExtendedItemDesign.java:45) at org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder.build(ReportQueryBuilder.java:251) at org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder.build(ReportQueryBuilder.java:233) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:136) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:94) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:51) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:138) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:68) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(Unknown Source) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(Unknown Source) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(Unknown Source) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(Unknown Source) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPageAll(Unknown Source)
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/command/LibraryCommand.java
* @throws PropertyValueException
	 */
	private void removeIncludeLibrary( String fileName, String namespace )
			throws PropertyValueException
	{
		assert fileName != null;
		assert namespace != null;
		List includeLibraries = module.getIncludedLibraries( );
		Iterator iter = includeLibraries.iterator( );
		while ( iter.hasNext( ) )
		{
			IncludedLibrary includeLibrary = (IncludedLibrary) iter.next( );
			if ( !namespace.equals( includeLibrary.getNamespace( ) ) )
				continue;
			if ( !fileName
					.endsWith( StringUtil
							.extractFileNameWithSuffix( includeLibrary
									.getFileName( ) ) ) )
				continue;
			ElementPropertyDefn propDefn = module
					.getPropertyDefn( IModuleModel.LIBRARIES_PROP );
			ComplexPropertyCommand propCommand = new ComplexPropertyCommand(
					module, module );
			propCommand.removeItem( new CachedMemberRef( propDefn ),
					includeLibrary );
			break;
		}
	}
}