Bug 314375 Failed report process after restart standalone BIRT engine
Build Identifier: public void main() throws BirtException, FileNotFoundException { generateReport(); // ok generateReport(); // exception see below } public void generateReport() throws BirtException, FileNotFoundException { String birtHomeDirectory = "..."; String fileNameReport = "..."; String fileNameDataset = "..."; EngineConfig config = new EngineConfig(); config.setEngineHome(birtHomeDirectory); Platform.startup(config); IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY ); IReportEngine engine = factory.createReportEngine( config ); IReportRunnable design = engine.openReportDesign(new FileInputStream(fileNameReport)); ReportDesignHandle reportDesignHandle = (ReportDesignHandle) design.getDesignHandle(); OdaDataSourceHandle dsHandle = (OdaDataSourceHandle) reportDesignHandle.getDataSources().get(0); dsHandle.setProperty("FILELIST", fileNameDataset); dsHandle.setProperty( "ENCODINGLIST", "UTF-8" ); IRunAndRenderTask task = engine.createRunAndRenderTask(design); HashMap contextMap = new HashMap(); task.setAppContext(contextMap); PDFRenderOption options = new PDFRenderOption(); options.setOutputStream(new ByteArrayOutputStream()); options.setOutputFormat("pdf"); task.setRenderOption(options); task.run(); task.close(); engine.destroy(); Platform.shutdown(); } --- Exception thrown second time: 26.05.2010 00:24:28 org.eclipse.birt.report.data.adapter.impl.ModelAdapter adaptDataSet WARNUNG: handle type: org.eclipse.birt.report.model.api.OdaDataSetHandle Exception in thread "main" org.eclipse.birt.report.model.api.command.PropertyNameException: The property "FILELIST" is invalid for element "Data Source". at org.eclipse.birt.report.model.command.PropertyCommand.setProperty(PropertyCommand.java:129) at org.eclipse.birt.report.model.api.DesignElementHandle.setProperty(DesignElementHandle.java:520) at com.ds.common.reportserver.server.BirtEngineTest.generateReport(BirtEngineTest.java:59) at com.ds.common.reportserver.server.BirtEngineTest.main(BirtEngineTest.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110) Reproducible: Always
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/plugin/ModelPlugin.java
{
	/*
	 * (non-Javadoc)
	 * 
	 * @seeorg.eclipse.birt.core.plugin.BIRTPlugin#start(org.osgi.framework.
	 * BundleContext)
	 */
	public void start( BundleContext context ) throws Exception
	{
		super.start( context );
		ODAProviderFactory.initeTheFactory( new ODABaseProviderFactory( ) );
		
		OdaExtensionLoaderFactory.initeFactory( new OdaBaseExtensionLoaderFactory() );
		BundleFactory.setBundleFactory( new PlatformBundleFactory( ) );
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
	 */
	public void stop( BundleContext context ) throws Exception
	{
		ODAProviderFactory.releaseInstance( );
		BundleFactory.releaseInstance( );
		MetaDataDictionary.releaseExtension( );
		super.stop( context );
	}
}