Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » NullPointerException on charts after upgrade from 2.5.2 to 3.7.2
NullPointerException on charts after upgrade from 2.5.2 to 3.7.2 [message #899435] Tue, 31 July 2012 15:12 Go to next message
Plamen Todorov is currently offline Plamen Todorov
Messages: 5
Registered: July 2012
Junior Member
Hello, we recently upgraded to 3.7.2 and started experiencing the exception listed below on our line charts. The problem appears only in the Web viewer while it works fine in the designer.

Our environment is:
Java 1.5
BIRT 3.7.2
Weblogic 10.3.2.0
Oracle 11g + ojdbc5

The report itself is kind of complex with many dependencies, and I was unable to create a simple report that reproduces the problem. I am also unable to identify which part is incompatible with 3.7.2. I also tried upgrading to 4.2.0 - same problem.

Has anyone faced this or similar issue? I'm not posting it as a bug since I can't provide enough information for possibly debugging it. Attaching an archive with the report files (but it can't be run without a DB).

Thank you in advance


org.eclipse.birt.report.engine.internal.document.v4.ContainerExecutor hasNextChild
WARNING: null
java.lang.NullPointerException
at org.eclipse.birt.report.engine.internal.document.v4.ExtendedItemExecutor.prepareChildExecutor(ExtendedItemExecutor.java:58)
at org.eclipse.birt.report.engine.internal.document.v4.ContainerExecutor.hasNextChild(ContainerExecutor.java:110)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:463)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:476)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:476)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:476)
at org.eclipse.birt.report.engine.layout.html.HTMLListingBandLM.intializeHeaderContent(HTMLListingBandLM.java:98)
at org.eclipse.birt.report.engine.layout.html.HTMLListingBandLM.initialize(HTMLListingBandLM.java:50)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.initialize(HTMLTableBandLM.java:44)
at org.eclipse.birt.report.engine.layout.html.HTMLLayoutManagerFactory.createLayoutManager(HTMLLayoutManagerFactory.java:40)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.createLayoutManager(HTMLReportLayoutEngine.java:138)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68)
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.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.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.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.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:661)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:294)
at org.eclipse.birt.report.service.ReportEngineService.renderReport(ReportEngineService.java:1547)
at org.eclipse.birt.report.service.BirtViewerReportService.getPage(BirtViewerReportService.java:204)
at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.doExecution(AbstractGetPageActionHandler.java:238)
at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:105)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
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:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)




  • Attachment: npe.zip
    (Size: 111.37KB, Downloaded 55 times)

[Updated on: Tue, 31 July 2012 15:14]

Report message to a moderator

Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899611 is a reply to message #899435] Wed, 01 August 2012 10:54 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

If you remove the charts does the issue occur?

Jason

On 7/31/2012 3:12 PM, Plamen Todorov wrote:
> Hello, we recently upgraded to 3.7.2 and started experiencing the exception listed below on our line charts. The problem appears only in the Web viewer while it works fine in the designer.
>
> Our environment is:
> Java 1.5
> BIRT 3.7.2
> Weblogic 10.3.2.0
> Oracle 11g + ojdbc5
>
> The report itself is kind of complex with many dependencies, and I was unable to create a simple report that reproduces the problem. I am also unable to identify which part is incompatible with 3.7.2. I also tried upgrading to 4.2.0 - same problem.
>
> Has anyone faced this or similar issue? I'm not posting it as a bug since I can't provide enough information for possibly debugging it. Attaching an archive with the report files (but it can't be run without a DB).
>
> Thank you in advance
>
>
> org.eclipse.birt.report.engine.internal.document.v4.ContainerExecutor hasNextChild
> WARNING: null
> java.lang.NullPointerException
> at org.eclipse.birt.report.engine.internal.document.v4.ExtendedItemExecutor.prepareChildExecutor(ExtendedItemExecutor.java:58)
> at org.eclipse.birt.report.engine.internal.document.v4.ContainerExecutor.hasNextChild(ContainerExecutor.java:110)
> at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
> at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:463)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:476)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:476)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:476)
> at org.eclipse.birt.report.engine.layout.html.HTMLListingBandLM.intializeHeaderContent(HTMLListingBandLM.java:98)
> at org.eclipse.birt.report.engine.layout.html.HTMLListingBandLM.initialize(HTMLListingBandLM.java:50)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.initialize(HTMLTableBandLM.java:44)
> at org.eclipse.birt.report.engine.layout.html.HTMLLayoutManagerFactory.createLayoutManager(HTMLLayoutManagerFactory.java:40)
> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.createLayoutManager(HTMLReportLayoutEngine.java:138)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68)
> 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.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.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.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.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:661)
> at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:294)
> at org.eclipse.birt.report.service.ReportEngineService.renderReport(ReportEngineService.java:1547)
> at org.eclipse.birt.report.service.BirtViewerReportService.getPage(BirtViewerReportService.java:204)
> at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.doExecution(AbstractGetPageActionHandler.java:238)
> at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:105)
> at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
> at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
> at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
> at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
> at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
> at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
> at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
> at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
> at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
> at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
> at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
> 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:292)
> at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
> at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
> at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
>
>
>
>
Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899826 is a reply to message #899611] Thu, 02 August 2012 09:35 Go to previous messageGo to next message
Plamen Todorov is currently offline Plamen Todorov
Messages: 5
Registered: July 2012
Junior Member
Hi Jason, thanks for the reply.
The error is definitely in rendering the charts, the report in question has 4 charts in a table group and instead of the charts I'm getting the following messages in the output (screenshot attached):

Chart (id = 1242):
+ null (Element ID:1242)
+ null (Element ID:1242)

Chart (id = 1630):
+ null (Element ID:1630)
+ null (Element ID:1630)

Chart (id = 1631):
+ null (Element ID:1631)
+ null (Element ID:1631)

Chart (id = 1632):
+ null (Element ID:1632)
+ null (Element ID:1632)

Chart (id = 1633):
+ null (Element ID:1633)
+ null (Element ID:1633)

Removing the charts removes the issue too.

Thanks
  • Attachment: chart_npe.JPG
    (Size: 133.50KB, Downloaded 69 times)
Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899843 is a reply to message #899826] Thu, 02 August 2012 10:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Plamen

If you remove the charts and then rebuild one of the charts using the
gui does it work?

Jason

On 8/2/2012 9:35 AM, Plamen Todorov wrote:
> Hi Jason, thanks for the reply.
> The error is definitely in rendering the charts, the report in question has 4 charts in a table group and instead of the charts I'm getting the following messages in the output (screenshot attached):
>
> Chart (id = 1242):
> + null (Element ID:1242)
> + null (Element ID:1242)
>
> Chart (id = 1630):
> + null (Element ID:1630)
> + null (Element ID:1630)
>
> Chart (id = 1631):
> + null (Element ID:1631)
> + null (Element ID:1631)
>
> Chart (id = 1632):
> + null (Element ID:1632)
> + null (Element ID:1632)
>
> Chart (id = 1633):
> + null (Element ID:1633)
> + null (Element ID:1633)
>
> Removing the charts removes the issue too.
>
> Thanks
>
Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899852 is a reply to message #899843] Thu, 02 August 2012 11:26 Go to previous messageGo to next message
Plamen Todorov is currently offline Plamen Todorov
Messages: 5
Registered: July 2012
Junior Member
Haven't tried that, will try and let you know
Thanks
Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899898 is a reply to message #899843] Thu, 02 August 2012 14:08 Go to previous messageGo to next message
Plamen Todorov is currently offline Plamen Todorov
Messages: 5
Registered: July 2012
Junior Member
OK, while recreating the chart I compared it to some other reports which were working ok and managed to identify (more like guess) the code which is not working in the 3.7.2 report viewer. The data plotted on the chart series is determined by the following code:

var birthWeighCode = reportContext.getPersistentGlobalVariable("birthWeighCode");
row[chartVarMap[params["chartVariable"].value][birthWeighCode]]

For some reason the first row is returning null on runtime though it works ok in designer. The birthWeighCode global variable is initialized in the onRender event of the enclosing data grid row and is also used elsewhere. Hardcoding the birthWeighCode makes the report run ok.

Obviously something changed in the 3.7.2 (or some intermeadiate releases) which makes the reportContext behave differently at runtime, at least in graphs.



Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899916 is a reply to message #899898] Thu, 02 August 2012 16:15 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

As a test can you set the persistent variable on the onCreate event?

Jason

On 8/2/2012 2:08 PM, Plamen Todorov wrote:
> OK, while recreating the chart I compared it to some other reports which
> were working ok and managed to identify (more like guess) the code which
> is not working in the 3.7.2 report viewer. The data plotted on the chart
> series is determined by the following code:
>
> var birthWeighCode =
> reportContext.getPersistentGlobalVariable("birthWeighCode");
> row[chartVarMap[params["chartVariable"].value][birthWeighCode]]
>
> For some reason the first row is returning null on runtime though it
> works ok in designer. The birthWeighCode global variable is initialized
> in the onRender event of the enclosing data grid row and is also used
> elsewhere. Hardcoding the birthWeighCode makes the report run ok.
>
> Obviously something changed in the 3.7.2 (or some intermeadiate
> releases) which makes the reportContext behave differently at runtime,
> at least in graphs.
>
>
>
>
Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899921 is a reply to message #899916] Thu, 02 August 2012 17:00 Go to previous messageGo to next message
Plamen Todorov is currently offline Plamen Todorov
Messages: 5
Registered: July 2012
Junior Member
OK, onCreate is working onRender doesn't seem to work.
It seems the event is not being called at all since the same variable is being overwritten multiple times in different charts, and still causing NPE in each one. I'm puzzled why this happens only at runtime.

Re: NullPointerException on charts after upgrade from 2.5.2 tp 3.7.2 [message #899927 is a reply to message #899921] Thu, 02 August 2012 17:55 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

In the designer are you previewing in the WebViewer? BTW, I do not
think setPersistent works in onRender because that commands writes into
the rptdocument and was designed to be used at run time so at render
time (maybe different time or machine) the render engine could get a
variable stored at run time. You may want to look at using
setGlobalVariable at render time which makes a variable global to the phase.

You could also throw in a script like:

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/events.txt", true ) );
out.println( "in my render event");
out.close();

Just to check if the event is being called. The onRender should be
getting called.

Jason

On 8/2/2012 5:00 PM, Plamen Todorov wrote:
> OK, onCreate is working onRender doesn't seem to work.
> It seems the event is not being called at all since the same variable is
> being overwritten multiple times in different charts, and still causing
> NPE in each one. I'm puzzled why this happens only at runtime.
>
>
Previous Topic:Grid as Table in PowerPoint
Next Topic:Custom aggregation through the plugin via eclipse data extension point
Goto Forum:
  


Current Time: Thu Aug 28 23:34:12 EDT 2014

Powered by FUDForum. Page generated in 0.02851 seconds