NPE in birt 4.2.2https://www.eclipse.org/forums/index.php/mv/msg/474150/1038958/#msg_1038958
First of all regards for your time and interest on reading this post.

The current problem is that when I run a report in a webapp with the birt engine 4.2.2 (got from maven repository), I get a a NPE in the middle of the execution. For example, if I run it in HTML output, it cuts the report and unexpectedly finish, in PDF output it is bad formed.

i am attaching the rpt design and the complete stack trace.

Thank you so much!

J

10-abr-2013 17:36:57 org.eclipse.birt.report.engine.api.impl.EngineTask handleFatalExceptions
GRAVE: An error happened while running the report. Cause:
java.lang.NullPointerException
at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.getCurrentResultIndex(CachedResultSet.java:499)
at org.eclipse.birt.data.engine.script.JSResultSetRow.get(JSResultSetRow.java:135)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1617)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1390)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1372)
at org.mozilla.javascript.gen.c38._c0(<inline>:0)
at org.mozilla.javascript.gen.c38.call(<inline>)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c38.call(<inline>)
at org.mozilla.javascript.gen.c38.exec(<inline>)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:99)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:138)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:992)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evalExpr(ScriptEvalUtil.java:928)
at org.eclipse.birt.data.engine.olap.impl.query.CubeQueryExecutor.createSimpleLevelFilter(CubeQueryExecutor.java:198)
at org.eclipse.birt.data.engine.olap.impl.query.CubeQueryExecutor.populateFilterHelpers(CubeQueryExecutor.java:343)
at org.eclipse.birt.data.engine.olap.impl.query.CubeQueryExecutor.<init>(CubeQueryExecutor.java:119)
at org.eclipse.birt.data.engine.olap.impl.query.CubeQueryResults.createCursor(CubeQueryResults.java:279)
at org.eclipse.birt.data.engine.olap.impl.query.CubeQueryResults.getCubeCursor(CubeQueryResults.java:161)
at org.eclipse.birt.report.engine.data.dte.CubeResultSet.<init>(CubeResultSet.java:98)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteCube(DteDataEngine.java:253)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:272)
at org.eclipse.birt.report.engine.executor.ExecutorManager$ExecutorContext.executeQuery(ExecutorManager.java:447)
at org.eclipse.birt.report.item.crosstab.core.re.executor.BaseCrosstabExecutor.executeQuery(BaseCrosstabExecutor.java:122)
at org.eclipse.birt.report.item.crosstab.core.re.executor.CrosstabReportItemExecutor.execute(CrosstabReportItemExecutor.java:102)
at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:62)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.traverse(HTMLAbstractLM.java:441)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.traverse(HTMLAbstractLM.java:442)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.traverse(HTMLAbstractLM.java:442)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.traverse(HTMLAbstractLM.java:442)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.traverse(HTMLAbstractLM.java:442)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.traverse(HTMLAbstractLM.java:442)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.handleVisibility(HTMLAbstractLM.java:374)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:123)
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.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.HTMLGroupLM.layoutChildren(HTMLGroupLM.java:117)
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.HTMLGroupLM.layoutChildren(HTMLGroupLM.java:117)
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.HTMLListLM.layoutChildren(HTMLListLM.java:72)
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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.unctad.framework.reporting.RunAndRenderReportTask.run(RunAndRenderReportTask.java:202)
at org.unctad.framework.reporting.UserDefinedReportF2ServiceImpl.runReport(UserDefinedReportF2ServiceImpl.java:70)
at org.unctad.framework.reporting.ReportCommonData.executeReport(ReportCommonData.java:135)
at org.unctad.framework.reporting.ReportingServiceImpl.selectAndRunReport(ReportingServiceImpl.java:30)
at org.unctad.framework.reporting.ReportingServiceImpl$$FastClassByCGLIB$$c8eadc8e.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
at org.unctad.framework.reporting.ReportingServiceImpl$$EnhancerByCGLIB$$649ef113.selectAndRunReport(<generated>)
at org.unctad.framework.reporting.ReportServlet.doGet(ReportServlet.java:218)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.unctad.framework.security.filter.SecurityTraceFilter.doFilter(SecurityTraceFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)]]>Juan Holder2013-04-11T14:49:27-00:00Re: NPE in birt 4.2.2https://www.eclipse.org/forums/index.php/mv/msg/474150/1039994/#msg_1039994
Michael Williams2013-04-12T22:50:29-00:00Re: NPE in birt 4.2.2https://www.eclipse.org/forums/index.php/mv/msg/474150/1043351/#msg_1043351
Michael Williams wrote on Fri, 12 April 2013 18:50

Well, it appears to be an issue with a result set. In HTML does it cut at the same point each time? Is some of the report visible? If so, where does it cut off? That might help you figure out which dataSet it's having issue with. If there is no output, can you try writing out to a text file from each dataSet to see where the report fails?

Dear Michael,

These reports where ok till we migrated from the 2.5 engine to the 4.2.2 engine.

The HTML output always cuts in the same part or section each time, and it is visible untill it finishes . It is the details section that contains a list of groups, it is the report on itself, I mean de iterable part. In PDF we just get a malformed document.