Cant startup the OSGI framework in BIRT [message #912200] |
Thu, 13 September 2012 02:05  |
Eclipse User |
|
|
|
***>[Question] Am using Birt_runtime_3_7_2, eclipse indigo and using the following code to render the rptdesign file.
***************************************************************************************
import java.util.logging.Level;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.*;
import com.opensymphony.xwork2.ActionSupport;
public class ExecuteReport extends ActionSupport{
/*
using Birt_runtime_3_7_2, eclipse indigo and using the following code to render the rptdesign file.
*/
public static void main(String args[]) throws EngineException,BirtException
{
EngineConfig config = new EngineConfig( );
config.setBIRTHome("F:/birt-runtime-3_7_2/ReportEngine");
config.setLogConfig("c:/temp", Level.FINE);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine engine = factory.createReportEngine(config);
IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("C:/name.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design); /* run and render the design file */
PDFRenderOption options1 = new PDFRenderOption();
options1.setOutputFileName("C:/test.pdf");
options1.setOutputFormat("pdf");
task.setRenderOption(options1);
task.run();
task.close();
engine.destroy();
Platform.shutdown();//shutdown the platform
}
}
*******************************************************************************
Even I ve set java build path. But when am trying to run this program its showing the following exception
*******************************************************************************
Exception in thread "main" org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI framework
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:91)
at ExecuteReport.main(ExecuteReport.java:20)
Caused by: org.eclipse.birt.core.exception.CoreException
at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OSGILauncher.java:90)
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:79)
... 1 more
********************************************************************************
>>'But i unable to solve it, Can anybody help me ???'
>>'Thanks in advance'.***
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09373 seconds