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
/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.model.plugin;
import org.eclipse.birt.core.plugin.BIRTPlugin;
import org.eclipse.birt.report.model.api.BundleFactory;
import org.eclipse.birt.report.model.extension.oda.ODAProviderFactory;
import org.eclipse.birt.report.model.extension.oda.OdaExtensionLoaderFactory;
import org.eclipse.birt.report.model.metadata.MetaDataDictionary;
import org.osgi.framework.BundleContext;
/**
 * The class to use the eclipse tracing facilities.
 */
public class ModelPlugin extends BIRTPlugin