Null pointer exception [message #1025391] |
Tue, 26 March 2013 10:39 |
Abhijit Mising name Messages: 1 Registered: December 2010 |
Junior Member |
|
|
I have a method named renderOutput when the code reaches the task.run it throws the below error.
This happens when we are trying for a bar chart . Same method works Works fine with the tabular format.
***************************************************************
try {
task = birtReportEngine.createRunAndRenderTask(ireportrunnable);
task.setAppContext(map);
task.setLocale(Locale.ENGLISH);
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
options.setImageDirectory(servletContext);
// options.setHtmlPagination(true);
options.setBaseImageURL(contextPath + ORMReportConstants.IMAGE_DIR);
options.setImageHandler(new HTMLServerImageHandler());
options.setOutputStream(outStream);
task.setParameterValue("AuthorName", "Dale DeMott");
task.setRenderOption(options);
task.run();
} catch (Exception e) {
e.printStackTrace();
} finally {
task.close();
}
**************************************************************
Mar 26, 2013 4:01:55 PM com.xxx.cre.ssp.orm.engine.reports.ReportRenderer
INFO: Entering To The Method: renderOutput()
java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.impl.EngineTask$ParameterVisitor.visit(EngineTask.java
:1319)
at org.eclipse.birt.report.engine.api.impl.EngineTask.doValidateParameters(EngineTask.java:6
60)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:92)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:75)
at com.xxx.cre.ssp.orm.engine.reports.ReportRenderer.renderOutput(ReportRenderer.java:138)
at com.xxx.cre.ssp.orm.engine.reports.ReportRenderer.initDesignRenderBarChart(ReportRender
er.java:230)
at com.xxx.cre.ssp.orm.service.reports.ORMReportServiceImpl.doReport1(ORMReportServiceImpl
.java:191)
at com.xxx.cre.ssp.orm.action.reports.ReportViewAction.execute(ReportViewAction.java:86)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java
:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.jav
a:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.xxx.cre.ssp.core.iui.filter.LocaleFilter.doFilter(LocaleFilter.java:33)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServ
letContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
ontext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2
273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
[Updated on: Tue, 26 March 2013 14:15] Report message to a moderator
|
|
|
Re: Null pointer exception [message #1029528 is a reply to message #1025391] |
Fri, 29 March 2013 20:41 |
|
Is that the entire stack trace? Do you have any other parameters that aren't getting set, possibly? If no, can you recreate this issue with a report that uses the sample database and attach your java file and report design file? Thanks.
Michael
Developer Evangelist, Silanis
|
|
|
Powered by
FUDForum. Page generated in 0.04297 seconds