Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-5874

Null Pointer Exception Generated for Working 4.8 PRPT Crosstab Report When Migrated Into PRD 7.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Unknown
    • Resolution: Won't Fix
    • Affects Version/s: 6.1.0.1 GA, 7.0.0 GA, 7.0.0.3 GA
    • Fix Version/s: None
    • Component/s: Crosstab, Report Generation
    • Labels:
      None
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Steps to Reproduce:
      Hide

      1. Open up the attached anonymized "sample_crosstab70.prpt" report in PRD 7.0 and try to preview the report in any format (PDF, HTML...) to generate a stacktrace which ends in a NullPointerException

      2. Open up the sub-reports and the nested sub-reports until until you find the "grade" and "grade<1>" nested sub-reports (Main Report > demographics_sc sub-report > demographic_students_title_sc sub-report > grade and grade<1> sub-reports) and remove the crosstab elements

      3. Preview the report again without the crosstabs and the NullPointerException no longer occurs

      Show
      1. Open up the attached anonymized "sample_crosstab70.prpt" report in PRD 7.0 and try to preview the report in any format (PDF, HTML...) to generate a stacktrace which ends in a NullPointerException 2. Open up the sub-reports and the nested sub-reports until until you find the "grade" and "grade<1>" nested sub-reports (Main Report > demographics_sc sub-report > demographic_students_title_sc sub-report > grade and grade<1> sub-reports) and remove the crosstab elements 3. Preview the report again without the crosstabs and the NullPointerException no longer occurs

      Description

      Reports containing Crosstab elements work successfully in PRD for 4.8 (3.9.4), but when migrated to PRD 7.0, result in a Null Pointer Exception.

      When originally opening up the report for the first time in 7.0, a message will display for "Incompatible report feature used" and will ask you to "Please migrate this report to version 7.0.0 or newer to work correctly". A screenshot is attached for demonstration.

      After migration to 7.0, executing the report will result in the following error stacktrace:

      org.pentaho.reporting.engine.classic.core.ReportProcessingException: Failed to process the report
      	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1479)
      	at org.pentaho.reporting.designer.core.actions.report.preview.PreviewPdfAction$ExportTask.run(PreviewPdfAction.java:105)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.pentaho.reporting.engine.classic.core.InvalidReportStateException: GroupStarted failed
      	at org.pentaho.reporting.engine.classic.core.layout.output.DefaultOutputFunction.groupStarted(DefaultOutputFunction.java:220)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireGroupStartedEvent(ExpressionEventHelper.java:236)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireReportEvent(ExpressionEventHelper.java:49)
      	at org.pentaho.reporting.engine.classic.core.states.InitialLayoutProcess.fireReportEvent(InitialLayoutProcess.java:175)
      	at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:172)
      	at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:172)
      	at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:172)
      	at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:172)
      	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:1114)
      	at org.pentaho.reporting.engine.classic.core.states.process.BeginCrosstabRowAxisHandler.advance(BeginCrosstabRowAxisHandler.java:37)
      	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:942)
      	at org.pentaho.reporting.engine.classic.core.states.process.InlineSubreportProcessor.processInline(InlineSubreportProcessor.java:74)
      	at org.pentaho.reporting.engine.classic.core.states.process.BeginGroupHandler.advance(BeginGroupHandler.java:52)
      	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:942)
      	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:673)
      	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:502)
      	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1433)
      	... 2 more
      Caused by: java.lang.NullPointerException
      	at org.pentaho.reporting.engine.classic.core.layout.build.DefaultLayoutModelBuilder.startBox(DefaultLayoutModelBuilder.java:167)
      	at org.pentaho.reporting.engine.classic.core.layout.build.DefaultLayoutModelBuilder.startBox(DefaultLayoutModelBuilder.java:134)
      	at org.pentaho.reporting.engine.classic.core.layout.output.crosstab.CrosstabOutputHelper.createAutomaticCell(CrosstabOutputHelper.java:320)
      	at org.pentaho.reporting.engine.classic.core.layout.output.crosstab.CrosstabOutputHelper.createAutomaticCell(CrosstabOutputHelper.java:314)
      	at org.pentaho.reporting.engine.classic.core.layout.output.crosstab.CrosstabRowOutputHandler.buildHeaderPlaceholder(CrosstabRowOutputHandler.java:168)
      	at org.pentaho.reporting.engine.classic.core.layout.output.crosstab.CrosstabRowOutputHandler.groupStarted(CrosstabRowOutputHandler.java:57)
      	at org.pentaho.reporting.engine.classic.core.layout.output.DefaultOutputFunction.groupStarted(DefaultOutputFunction.java:216)
      	... 18 more
      

      The NullPointerException will be resolved if all Crosstab elements are removed from the report.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sbaker Steve Baker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: