Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
pie chart generation in websphere 6.1
malligaadu
Hi,
I am using BIRT 2.2, and using application server is websphere 6.1.
I had developed a small servlet which is having pie chart generation code. I am using sql server 2005 and DB2 databases in rptdesign file.
If I run the application with above mentioned data in JBoss it is running properly, but same war file is not running in websphere it is throwing exception
"org.eclipse.birt.report.engine.api.EngineException: report engine fails to initialise html emitter, please make sure required libraries for this emitter and installed"
this exception is rising at "org.eclipse.birt.report.engine.api.impl.EngineTask.createContentEmitter(EngineTask.java:1034)"
and one more thing with that servlet I can able to generate normal reports.
My application folder structure is
WEB-INF/platform/plugins,configurations.
please by sending proper answer help me a lot.
Find more posts tagged with
Comments
cypherdj
Can you send the servlet code?
I think the problem probably lies in the way you initialise the report engine.
Regards,
Cedric
malligaadu
thanks for ur reply
I am sending my servlet code Please have a look at that.
class WebReport extends HttpServlet
{
IReportEngine birtReportEngine;
doGet(req,resp) throws
{
resp.setContentType("text/html");
ServletContext sc = req.getSession().getServletContext();
birtReportEngine = BirtEngine.getBirtEngine(sc);
IReportRunnable design;
try
{
design = birtReportEngine.openReportDesign("rptdesign file location");
IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask(desing);
HTMLRenderOptions options = new HTMLRenderOptions();
options.setOutputFormat(HTMLRederOptions.OUTPUT_FORMAT_HTML);
options.setOutputStream(req.getOutputStream());
task.setRenderOptions(options);
task.run();
task.close();
}
catch(Exception e)
{e.printStackTrace();}
}
}
public class BirtEngine
{
static IReportEngine engine;
static EngineConfig config;
static IPlatformContext context;
public static synchronized IReportEngine getBirtEngine(ServletContext sc)
{
if(engine == null)
{
config = new EngineConfig();
config.setEnginHome("");
context = new PlatformServletContext(sc);
config.setplatformContext(context);
try
{
platform.startUp(config);
IReportEngineFactory factory = (IReportEngineFactory ) platform.createfactoryObject(IReportEngineFactory .EXTENSION_REPORT_ENGINE_FACTORY);
engine= factory.createReportEngine(config);
return engine;
}
catch(Exception e){}
}
else
{
return engine;
}
}
}