Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Report Engine fails to initialize html emitter
Report Engine fails to initialize html emitter [message #255073] Tue, 11 September 2007 15:38 Go to next message
Eclipse UserFriend
Originally posted by: deadwinterday.yahoo.com

Hi folks:

I am trying to deploy a report from within a Spring MVC controller,
following the servlet example at
http://wiki.eclipse.org/index.php/Servlet_Example. I am running into the
following exception when I call the RunAndRenderTask's run method:

11:31:49,340 ERROR [STDERR] Sep 11, 2007 11:31:49 AM
org.eclipse.birt.report.engine.api.impl.EngineTask createContentEmitter
SEVERE: Report engine can not create html emitter.
10:44:43,352 ERROR [STDERR]
org.eclipse.birt.report.engine.api.EngineException: Report engine fails to
initialize html emitter, please make sure required libraries for this
emitter are installed.
10:44:43,352 ERROR [STDERR] at
org.eclipse.birt.report.engine.api.impl.EngineTask.createCon tentEmitter(EngineTask.java:1034)
10:44:43,352 ERROR [STDERR] at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:95)
10:44:43,352 ERROR [STDERR] at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask....

This is running inside a war, and I included ALL of the reporting engine's
plugins and libs under the WEB-INF folder (as per the example). I fail to
see which library or jar the emitter might need that is not in there. The
Platform initializes, so it can certainly find BIRT_HOME.

Can anyone point out if there is anything I may be missing in setting up
the various components before the render call?

Here's the relevant code (I am omitting BirtEngine, as it's the same as
the abovementioned example):

public ModelAndView handleRequest(HttpServletRequest req,
HttpServletResponse resp) throws Exception {

String reportName = req.getParameter("ReportName");
ServletContext sc = req.getSession().getServletContext();
this.birtReportEngine = BirtEngine.getBirtEngine(sc);

//setup image directory
HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setBaseImageURL(req.getContextPath() + "/images");
renderContext.setImageDirectory(sc.getRealPath("/images"));

HashMap<String, HTMLRenderContext> contextMap =
new HashMap<String, HTMLRenderContext>();
contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEX T,
renderContext);

IReportRunnable design;

try {

//Open report design
design = this.birtReportEngine.openReportDesign(
"c:\\speedometer.rptdesign");

//create task to run and render report
IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask(
design);

task.setAppContext(contextMap);

//set output options
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML) ;
options.setOutputStream(resp.getOutputStream());
task.setRenderOption(options);

//run report
task.run();
task.close();
} catch (Exception e) {
e.printStackTrace();
throw new ServletException(e);
}
return null;
}
Re: Report Engine fails to initialize html emitter [message #255080 is a reply to message #255073] Tue, 11 September 2007 16:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: deadwinterday.yahoo.com

o..k...

After attaching the latest 2_2_0 sources, I can see that ExtensionManager
is failing this check, on line 226:

if (config != null)
{
Object object = createObject(config, "class"); //$NON-NLS-1$
if (object instanceof IContentEmitter)
{
return (IContentEmitter)object;
}
}
return null;
Re: Report Engine fails to initialize html emitter [message #255084 is a reply to message #255073] Tue, 11 September 2007 16:51 Go to previous message
Eclipse UserFriend
Originally posted by: deadwinterday.yahoo.com

Ok, after attaching the source I see that ExtensionManager is failing this
check, on line 226:

if (config != null)
{
Object object = createObject(config, "class"); //$NON-NLS-1$
if (object instanceof IContentEmitter)
{
return (IContentEmitter)object;
}
}
return null;

Yet the debugger indicates that object is of type
org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte r

strange.
Previous Topic:Detect No Data condition in Scripted data source
Next Topic:Latest Eclipse/BIRT all in one for 64 bit Linux?
Goto Forum:
  


Current Time: Thu Apr 25 17:08:57 GMT 2024

Powered by FUDForum. Page generated in 0.03333 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top