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

Error switching project quality profile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.4
    • Fix Version/s: 5.6
    • Component/s: Quality Profile, Web API
    • Labels:

      Description

      SQ returns a 500 and redirects to an error page when trying to switch a project's quality profile in the project admin / quality profile page.

      This only happens when switching away from another non 'Default' dropdown option.

      Reproduce bug:

      • Select 'Sonar way' or a custom profile in dropdown
      • Click Update
      • Select another custom profile in dropdown
      • Click Update

      Workaround:

      • Select 'Default' in dropdown
      • Click Update
      • Select 'New profile' in dropdown
      • Click Update

      SQ log says...

          2016.03.21 19:04:50 ERROR web[o.s.s.ui.JRubyFacade] Fail to render: https://sonarqube.mo.ca.am.ericsson.se/project/set_profile
      
          Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uniq_project_qprofiles"
            Detail: Key (project_uuid, profile_key)=(AAAAAAAk9eqrl9mYG67v, css-my-new-profile-88790) already exists.
          The error may involve defaultParameterMap
          The error occurred while setting parameters
          SQL: UPDATE project_qprofiles SET profile_key=? WHERE project_uuid=?
          Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uniq_project_qprofiles"
            Detail: Key (project_uuid, profile_key)=(AAAAAAAk9eqrl9mYG67v,css-my-new-profile-88790) already exists.
          	org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
          	org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154)
          	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:54)
          	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            teryk.bellahsene Teryk Bellahsene
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: