Component key length is longer than the maximum authorized (400)

  • versions used SonarQube 6.7
  • error observed: Component key length (401) is longer than the maximum authorized (400)
  • steps to reproduce: run run sonar on long project key on long sub module with long full qualify file name - all together should exceed 400 chars.
  • potential workaround - manipulate sonar.projectKey - but it won’t prevent from a developer in the future to add file that will eventually will exceed the allowed component key length - and hence analysy and will fail.

update 01

  • when maven building default projectKey - the analysis task in sonarqube complete successful.
    in this case the component key is built this way: sub-module + full qualify file name.

  • when sonar.projectKey explicitly populated (even with the same default key maven would generate): the component key is built this way: sonar.projectKey + sub-module (groupId:artifactId) + full qualify file name.

update 02

  • when the same project run on SonarQube 7.9.2 component key generated differently (and much shorter)-
    sonar.projectKey + sub-module (artifactId) + full qualify file name.

please fix this bug or advise how to overcome it

Hi,

You’ve already observed that the problem is fixed in the current LTS, 7.9.3. So to overcome it, you’ll just upgrade to a supported version; 6.7 is past EOL.

 
Ann