Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
error.CannotStartupOSGIPlatform BIRT 3.2.22
meehanmartin
Hi,
I'm getting the following on 3.2.22. The background is I'm writing code to run a report, emit it as a csv file and attach it to an email.
13/11/2012 02:57:00 org.eclipse.birt.report.engine.api.ReportEngine <init>
SEVERE: error.CannotStartupOSGIPlatform
org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:92)
at org.eclipse.birt.report.engine.api.ReportEngine.<init>(ReportEngine.j
ava:59)
at com.konakartadmin.bl.util.RunBIRTReport.runReport(Unknown Source)
at com.konakartadmin.bl.AdminOrderBatchMgr.sendBIRTReportEmail(Unknown S
ource)
at com.konakartadmin.bl.AdminOrderBatchMgr.emailBIRTReportBatch(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.konakartadmin.bl.AdminExecuteMgr.execute(Unknown Source)
at com.konakartadmin.bl.KKAdmin.execute(Unknown Source)
at com.konakartadmin.bl.ExecuteBatchEE.execute(Unknown Source)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
ava:525)
I had it working before on 3.7 with the below but I have to make it work with 3.2.22 now for compatibility reasons.
public String runReport(String reportName, String frequency) {
//Variables used to control BIRT Engine instance
EngineConfig conf = null;
ReportEngine eng = null;
IReportRunnable design = null;
IRunAndRenderTask task = null;
CSVRenderOption options = null;
conf = new EngineConfig();
String confFile = null;;
try {
confFile = new File("../webapps/birtviewer/reports/lib/").getCanonicalPath();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
conf.setEngineHome(confFile + File.separator);
INSERT HERE
//Create new Report engine based off of the configuration
eng = new ReportEngine(conf);
//With our new engine, lets try to open the report design
try
{
String reportFile = null;;
try {
reportFile = new File("../webapps/birtviewer/reports/stores/store1/").getCanonicalPath();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
design = eng.openReportDesign(reportFile + File.separator + reportName);
I've added in the following on 3.2.22 at INSERT HERE to try to start it but same exception.
try {
Platform.startup(conf);
} catch (BirtException e2) {
System.out.println("platform startup not working");
e2.printStackTrace();
}
Any ideas?
Thanks,
Martin
Find more posts tagged with
Comments
mwilliams
3.7 has a POJO runtime and the older versions did not. The issue is probably that you need to set BIRT_HOME, in your code, for the OSSG Runtime.