adoptableCoho
adoptableCoho

Reputation: 11

Error when selecting Quality Profile after upgrading from to 4.2

Recently upgraded from SonarQube 4.2 to SonarQube 4.3.

In the UI: Get "We're sorry, but something went wrong." Clicked on "Go back to the homepage" and the following message is included towards the top of the page:

Only offset must be set on DebtRemediationFunction{type=CONSTANT_ISSUE, coefficient=1h, offset=}

In sonar.log:

2014.05.09 17:07:25 ERROR [o.s.s.ui.JRubyFacade] Fail to render: http://our-server.example/rules_configuration/index/9 undefined method `inject' for nil:NilClass On line #52 of app/views/rules_configuration/index.html.erb

49:       </div>
50:       <div class="rule-search top">
51:         <span class="note"><%= message('rules_configuration.repository') -%></span><br/>
52:         <%= dropdown_tag "repositories", options_for_select(@select_repositories, @repositories), {
53:             :show_search_box => true,
54:             :width => '120px',
55:             :placeholder => message('any')

gems/gems/actionpack-2.3.15/lib/action_view/helpers/form_options_helper.rb:292:in `options_for_select'
app/views/rules_configuration/index.html.erb:52:in `block_called_from_erb?'
org/jruby/RubyProc.java:290:in `call'
org/jruby/RubyProc.java:224:in `call'
gems/gems/actionpack-2.3.15/lib/action_view/helpers/capture_helper.rb:36:in `capture'

Updated with plugins and versions 5/13/2014

Plugins & Versions:

Build Breaker [buildbreaker]    1.1
Checkstyle [checkstyle] 2.1
Issues Report [issuesreport]    1.2.1
Java [java] 2.2
PMD [pmd]   2.1
Useless Code Tracker [uselesscodetracker]   1.0

Any ideas?

Upvotes: 1

Views: 360

Answers (2)

Julien L.
Julien L.

Reputation: 2587

A JIRA ticket has been created to fix this issue : https://jira.codehaus.org/browse/SONAR-5335

You'll have to follow steps described in the description to manually fix it.

Upvotes: 2

andrew
andrew

Reputation: 87

I have exactly the same issue. Seems like the only way is to rollback to 4.2, but it's only possible if you have DB backup.

Update: possible workaround

It seems to be a PMD plugin related issue. I found the following workaround:

  1. Save a backup of your quality profile
  2. Change the name in saved xml to prevent collision
  3. Restore the profile from the saved xml
  4. Use new profile instead of the original

You may notice that the number of active rules in a new profile is a bit decreased.

Upvotes: 0

Related Questions