Search code examples
sonarqube

SonarQube - cannot do Restore Profile


I am trying to import a quality profile that is in xml-format. My SonarQube runs fine with the quality profile that is in jar-format, but it does not import the xml whatsoever.

It is not just one xml that is causing the problem. When I back up a working quality profile (originated in jar-format) and restore it, it causes a similar problem.

SonarQube version: 4.3.1
DB: psql
OS: red hat

Steps taken:

  1. Downloaded xml created from other computer (I believe it was made in red hat linux as well)
  2. Log in as admin. Go to Quality Profiles -> Restore Profile -> selected xml back up profile.
  3. Error message show up:
  • Rule not found: [repository=c-cppcheck, key=selfAssignment]
  • Rule not found: [repository=c-cppcheck, key=returnTempPointer] ....

Other things I tried:

  1. Download opensource quality profile. Back them up and it create xml. Using xml backup file to restore. result is same "Rule not found" message
  2. Even tried using curl to upload profile but it gave me a similar errors. It actually gave more than just 4 error message. They were all about Rule not found.
  3. Tried to remove SonarQube and install. Same.
  4. Dropped db and recreated to see if that makes any change. Same.

SonarQube Doc. says it is possible. I am not sure what I am doing it wrong.

http://docs.codehaus.org/display/SONAR/Profile+Existence+Edits#ProfileExistenceEdits-Backingup/RestoringaProfile


Solution

  • Since the error message is

    Rule not found: [repository=c-cppcheck, key=selfAssignment]

    Rule not found: [repository=c-cppcheck, key=returnTempPointer] ....

    I assume that you try to check c++ code.

    Are your c++ plugins of the same version? Are your sonarqube-servers of the same version?

    Compare server´s and plugins´ version of your export and import installation.