1

After upgrading from 4.0 -> 4.5.6 -> 5.2 I am seeing numerous runs of mvn sonar:sonar failing with a null pointer exception. Strangely not all projects are affected and new projects don't exhibit this behavior.

For the ones that fail the output below is consistent. When I click the url that is reported for the request listed below I get {"errors":[{"msg":""}]}

2015.11.23 18:17:41 ERROR web[o.s.s.w.WebServiceEngine] Fail to process request http://mysonarurl/batch/project.protobuf?key=com.groupid%3Aartifactid
java.lang.NullPointerException: null
    at com.google.protobuf.Utf8.encodedLength(Utf8.java:378) ~[protobuf-java-3.0.0-beta-1.jar:na]
    at com.google.protobuf.CodedOutputStream.computeStringSizeNoTag(CodedOutputStream.java:911) ~[protobuf-java-3.0.0-beta-1.jar:na]
    at com.google.protobuf.FieldSet.computeElementSizeNoTag(FieldSet.java:834) ~
[snip]

It looks like a similar issue was fixed at 5.1.

schnatterer
  • 7,525
  • 7
  • 61
  • 80
  • It probably fails because some component paths are null. A related [jira ticket](https://jira.sonarsource.com/browse/SONAR-7084) has been created – Teryk - SonarSource Nov 26 '15 at 15:40
  • Possible duplicate of [Failed to run analysis SonarQube 5.2 from Jenkins with specific artifact name](http://stackoverflow.com/questions/33727042/failed-to-run-analysis-sonarqube-5-2-from-jenkins-with-specific-artifact-name) – Teryk - SonarSource Nov 26 '15 at 16:11
  • I see this issue when using my local environment as well as from Jenkins. I have also tried changing the project key which still results in a failed analysis. Is there anyway to work around null component paths? – Robert Bracewell Nov 28 '15 at 04:53
  • I suggest to update to a newer version of SQ where the problem is [fixed](https://jira.sonarsource.com/browse/SONAR-7084) – Teryk - SonarSource Jun 03 '16 at 13:29

0 Answers0