Hi,
I am creating a .rptdocument using the IRunTask to ultimately extract data using the IDataExtractionTask, but i could not create the .rptdocument at the first place. Following is the code:
config = new EngineConfig();
IPlatformContext context = new PlatformFileContext();
config.setPlatformContext(context);
Platform.startup(config);
IReportEngineFactory reportEngineFactory = (IReportEngineFactory) Platform.
createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
reportEngine = reportEngineFactory.createReportEngine(config);
reportEngine.changeLogLevel(Level.WARNING);
IReportRunnable reportRunnable = reportEngine.openReportDesign(reportDesign);
IRunTask runTask = reportEngine.createRunTask(reportRunnable);
runTask.run("C:\\Users\\Entrib\\codebase\\ReportDemo\\production.rptdocument");
Following is the exception stack:
org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:282)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:85)
at com.entrib.report.ui.run.HTMLReportRun.main(HTMLReportRun.java:57)
Caused by: java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.charExists(I)Z
at org.eclipse.birt.report.engine.layout.pdf.font.FontHandler.getMappedFont(FontHandler.java:219)
at org.eclipse.birt.report.engine.layout.pdf.font.FontHandler.selectFont(FontHandler.java:162)
at org.eclipse.birt.report.engine.layout.pdf.font.FontSplitter.buildChunk(FontSplitter.java:98)
at org.eclipse.birt.report.engine.layout.pdf.font.FontSplitter.getNext(FontSplitter.java:189)
at org.eclipse.birt.report.engine.layout.pdf.text.ChunkGenerator.getNext(ChunkGenerator.java:104)
at org.eclipse.birt.report.engine.nLayout.area.impl.TextCompositor.getNextTextArea(TextCompositor.java:189)
at org.eclipse.birt.report.engine.nLayout.area.impl.TextCompositor.getNextArea(TextCompositor.java:127)
at org.eclipse.birt.report.engine.nLayout.area.impl.TextAreaLayout.layoutChildren(TextAreaLayout.java:182)
at org.eclipse.birt.report.engine.nLayout.area.impl.TextAreaLayout.layout(TextAreaLayout.java:173)
at org.eclipse.birt.report.engine.nLayout.area.impl.InlineTextArea.layout(InlineTextArea.java:65)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContent(LayoutEngine.java:538)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startText(ContentEmitterAdapter.java:147)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startLabel(ContentEmitterAdapter.java:153)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:65)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.visitContent(LayoutEngine.java:693)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.visitContent(LayoutEngine.java:701)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startForeign(LayoutEngine.java:736)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:77)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.visitContent(LayoutEngine.java:693)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.visitChildren(LayoutEngine.java:717)
at org.eclipse.birt.report.engine.nLayout.RegionLayoutEngine.layout(RegionLayoutEngine.java:31)
at org.eclipse.birt.report.engine.nLayout.area.impl.PageArea.layoutFooter(PageArea.java:478)
at org.eclipse.birt.report.engine.nLayout.area.impl.PageArea.initialize(PageArea.java:249)
at org.eclipse.birt.report.engine.nLayout.area.impl.RootArea.createNewPage(RootArea.java:147)
at org.eclipse.birt.report.engine.nLayout.area.impl.RootArea.initialize(RootArea.java:138)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.setContainer(LayoutEngine.java:366)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine._startContainer(LayoutEngine.java:453)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContainer(LayoutEngine.java:353)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startPage(ContentEmitterAdapter.java:65)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:47)
at org.eclipse.birt.report.engine.layout.html.buffer.PageNode.start(PageNode.java:49)
at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79)
at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79)
at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79)
at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79)
at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:113)
at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:287)
at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:260)
... 2 more
I got the same exception when creating a report in pdf format, which is a bug for birt 3.7.1 (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=360699).
Can anyone help?
Thanks,
Juhi