Struts 2
  1. Struts 2
  2. WW-48

NPE using empty List with Jasper Reports

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: WW 1.2
    • Fix Version/s: None
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      Looks like the iterator for the ValueStackDataSource somehow got to be null producing the stack trace below. My report data is producing an empty list for the detail records.

      java.lang.NullPointerException
      at webwork.view.jasperreports.ValueStackDataSource.next(ValueStackDataSource.java:53)
      at dori.jasper.engine.fill.JRBaseFiller.next(JRBaseFiller.java:554)
      at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111)
      at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:329)
      at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:96)
      at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:301)
      at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:259)
      at webwork.view.jasperreports.JasperReportViewServlet.service(JasperReportViewServlet.java:67)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
      at webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:312)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:531)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:484)

        Activity

        Jeff Turner made changes -
        Project Import Mon Feb 01 01:17:42 UTC 2010 [ 1264987062082 ]
        Antonio Petrelli made changes -
        Workflow Struts - editable closed status (temporary) [ 47614 ] Struts - editable closed status [ 52332 ]
        Antonio Petrelli made changes -
        Workflow Struts - editable closed status [ 43167 ] Struts - editable closed status (temporary) [ 47614 ]
        Jeff Turner made changes -
        Workflow Struts [ 39339 ] Struts - editable closed status [ 43167 ]
        Don Brown made changes -
        Workflow jira [ 21271 ] Struts [ 39339 ]
        matt baldree made changes -
        Status Resolved Closed
        Peter Kelley made changes -
        Resolution Fixed
        Status Assigned Resolved
        Hide
        Peter Kelley added a comment -

        Updated ValueStackDataSource to avoid the NPE and log a warning if its data source is null.

        Show
        Peter Kelley added a comment - Updated ValueStackDataSource to avoid the NPE and log a warning if its data source is null.
        Peter Kelley made changes -
        Assignee yellek yellekau
        Peter Kelley made changes -
        Field Original Value New Value
        Assignee matt yellek
        Hide
        Peter Kelley added a comment -

        This shouldn't be too hard to fix when I get in on Monday

        Show
        Peter Kelley added a comment - This shouldn't be too hard to fix when I get in on Monday
        Peter Kelley created issue -

          People

          • Assignee:
            Peter Kelley
            Reporter:
            Peter Kelley
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development