Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-9252

Custom Measure with empty value causes NPE during report processing on Oracle

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6.6, 6.4
    • Fix Version/s: 6.5-M1, 6.5
    • Component/s: Compute Engine
    • Labels:

      Description

      Error such as the following can occur during processing of an analysis report in the Compute Engine:

      2017.05.10 11:30:21 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVvx6Ms_cmU69QSuTAqh
      org.sonar.server.computation.component.VisitException: Visit of Component {key=BL_C_M_AM_Mus_CI_Med_QP,type=PROJECT} failed
      	at org.sonar.server.computation.component.VisitException.rethrowOrWrap(VisitException.java:44) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:41) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.CustomMeasuresCopyStep.execute(CustomMeasuresCopyStep.java:63) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:75) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) [sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) [sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-5.6.3.jar:na]
      	at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_121]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_121]
      	at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_121]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [na:1.8.0_121]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_121]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_121]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_121]
      	at java.lang.Thread.run(Unknown Source) [na:1.8.0_121]
      Caused by: java.lang.NullPointerException: null
      	at java.util.Objects.requireNonNull(Unknown Source) ~[na:1.8.0_121]
      	at org.sonar.server.computation.measure.Measure$NewMeasureBuilder.create(Measure.java:176) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.CustomMeasuresCopyStep.dtoToMeasure(CustomMeasuresCopyStep.java:103) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.CustomMeasuresCopyStep.copy(CustomMeasuresCopyStep.java:70) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.CustomMeasuresCopyStep.access$000(CustomMeasuresCopyStep.java:40) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.step.CustomMeasuresCopyStep$1.visitAny(CustomMeasuresCopyStep.java:61) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.component.DepthTraversalTypeAwareCrawler.visitNode(DepthTraversalTypeAwareCrawler.java:67) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:51) ~[sonar-server-5.6.3.jar:na]
      	at org.sonar.server.computation.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39) ~[sonar-server-5.6.3.jar:na]
      	... 15 common frames omitted
      

      This error is caused, on Oracle specifically, by a custom measure with an empty value.

        Attachments

          Activity

            People

            • Assignee:
              sebastien.lesaint Sebastien Lesaint
              Reporter:
              sebastien.lesaint Sebastien Lesaint
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: