Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDF-REPORT-1.2.1
    • Component/s: PDF Report
    • Labels:
      None
    • Environment:
      Sonar 2.10 with PDF Report 1.2.
      Sonar 2.10 has been installed after an updating from 2.9.
      In Sonar 2.9, the PDF Reports were OK
    • Number of attachments :
      4

      Description

      In a project where the PDF Report is not skipped, I get a NullPointerException in the method "initCategoriesRciFromNode" or the entity "Project" (see the stacktrace).

      1. Joblog.txt
        36 kB
        Hans Aikema
      2. sonar_system_info.csv
        6 kB
        Hans Aikema
      3. stacktrace_debug
        20 kB
        gigaga
      4. stacktrace.txt
        6 kB
        gigaga

        Activity

        Hide
        Hans Aikema added a comment -

        The issue is without a doubt in the following code at line 243 of Project.java of the maven-pdf-report-plugin

        Document categoriesRci = sonarAccess.getUrlAsDocument(UrlPath.RESOURCES + this.key + UrlPath.PARENT_PROJECT
        + UrlPath.CATEGORIES_VIOLATIONS_DENSITY + UrlPath.XML_SOURCE);
        if (categories.selectSingleNode(PROJECT) != null) {
        this.initCategoriesRciFromNode(categoriesRci.selectSingleNode(PROJECT));

        The null-check should be done on categoriesRci.selectSingleNode(PROJECT) rather than categories.selectSingleNode(PROJECT).

        Show
        Hans Aikema added a comment - The issue is without a doubt in the following code at line 243 of Project.java of the maven-pdf-report-plugin Document categoriesRci = sonarAccess.getUrlAsDocument(UrlPath.RESOURCES + this.key + UrlPath.PARENT_PROJECT + UrlPath.CATEGORIES_VIOLATIONS_DENSITY + UrlPath.XML_SOURCE); if (categories.selectSingleNode(PROJECT) != null) { this.initCategoriesRciFromNode(categoriesRci.selectSingleNode(PROJECT)); The null-check should be done on categoriesRci.selectSingleNode(PROJECT) rather than categories.selectSingleNode(PROJECT) .
        Hide
        Hans Aikema added a comment -

        I think this issue could already occur since Sonar 2.5, as I would guess that the encountered NULL-value is a direct consequence of SONAR-2007.

        Show
        Hans Aikema added a comment - I think this issue could already occur since Sonar 2.5, as I would guess that the encountered NULL-value is a direct consequence of SONAR-2007 .
        Hide
        gigaga added a comment -

        Hi Hans,

        show the stacktrace generated in debug mode from Maven.

        Thx

        Show
        gigaga added a comment - Hi Hans, show the stacktrace generated in debug mode from Maven. Thx
        Hide
        Antonio Manuel Muñiz Martín added a comment -

        Hi guys,

        I think the best option is remove all RCI categories related stuff, as it has been removed from Sonar.
        I will commit changes and release.

        Show
        Antonio Manuel Muñiz Martín added a comment - Hi guys, I think the best option is remove all RCI categories related stuff, as it has been removed from Sonar. I will commit changes and release.
        Hide
        Antonio Manuel Muñiz Martín added a comment -

        All code related to categories has been deleted

        Show
        Antonio Manuel Muñiz Martín added a comment - All code related to categories has been deleted

          People

          • Assignee:
            Antonio Manuel Muñiz Martín
            Reporter:
            gigaga
          • Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: