jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Sonar
  • SONAR-184

Rules breakdown gives Syntax error page

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.2.1
  • Component/s: Web
  • Labels:
    None

Description

I installed Sonar and run the mvn command on my open source project (http://vigilog.sf.net). When I try to look at the Rules Breakdown, I get this:

ActiveRecord::StatementInvalid in RulesController#breakdown

ArgumentError: Syntax error: Encountered "NULL" at line 1, column 192.: SELECT * FROM project_measures WHERE (project_measures.rules_category_id IS NULL AND project_measures.rule_id IS NULL AND project_measures.metric_id = 23 AND project_measures.snapshot_id IN (NULL))  ORDER BY value desc

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Simon Brandhof added a comment - 07/Mar/08 10:44 AM

Easy response, your project works on our server : http://sonar-demo.hortis.ch/project/dashboard/1752 ;o)

Do you have coding rules measures on the dashboard (for example total 89.7 %) ?
If you upgraded from 1.0.2 to 1.1, are your measures generated with the old version ?

Thanks for your feedback.

Show
Simon Brandhof added a comment - 07/Mar/08 10:44 AM Easy response, your project works on our server : http://sonar-demo.hortis.ch/project/dashboard/1752 ;o) Do you have coding rules measures on the dashboard (for example total 89.7 %) ? If you upgraded from 1.0.2 to 1.1, are your measures generated with the old version ? Thanks for your feedback.
Hide
Permalink
Wim Deblauwe added a comment - 08/Mar/08 1:06 AM

I downloaded the 1.1 version, never had any other version installed. What did happen is the first time I ran the mvn command for sonar, maven stopped due to an enforcer rule I have (I was running JDK 1.6 and I enforce JDK 1.5). Then I run the command again and looked at the website and then I got the error.

Show
Wim Deblauwe added a comment - 08/Mar/08 1:06 AM I downloaded the 1.1 version, never had any other version installed. What did happen is the first time I ran the mvn command for sonar, maven stopped due to an enforcer rule I have (I was running JDK 1.6 and I enforce JDK 1.5). Then I run the command again and looked at the website and then I got the error.
Hide
Permalink
Eric Bottard added a comment - 26/Mar/08 12:38 PM

Would it make sense to re-open as I too stumbled on it
Fresh sonar 1.1 install (never had any previous version), fresh monitored project (inherits from a base pom, if that may help)

Please acknoledge the comment, let alone investigate the issue.

Show
Eric Bottard added a comment - 26/Mar/08 12:38 PM Would it make sense to re-open as I too stumbled on it Fresh sonar 1.1 install (never had any previous version), fresh monitored project (inherits from a base pom, if that may help) Please acknoledge the comment, let alone investigate the issue.
Hide
Permalink
Simon Brandhof added a comment - 27/Mar/08 8:07 AM

This issue should be fixed into the version 1.2, released yesterday. Could you check that it works better ?

Show
Simon Brandhof added a comment - 27/Mar/08 8:07 AM This issue should be fixed into the version 1.2, released yesterday. Could you check that it works better ?
Hide
Permalink
Eric Bottard added a comment - 27/Mar/08 8:12 AM

Tried that already, but without success

I'm in doubt though : i deleted my whole sonar-1.1 folder, but were the databases stored elsewhere (i saw some "upgrades" at startup).
The other sensible place to look was my home folder, but I found nothing that seemed related to sonar.

Show
Eric Bottard added a comment - 27/Mar/08 8:12 AM Tried that already, but without success I'm in doubt though : i deleted my whole sonar-1.1 folder, but were the databases stored elsewhere (i saw some "upgrades" at startup). The other sensible place to look was my home folder, but I found nothing that seemed related to sonar.
Hide
Permalink
Eric Bottard added a comment - 27/Mar/08 8:15 AM

Found it ! If I understand correctly, the db is in SONAR_DIR/data/sonar and so it went away when I deleted the whole dir.

So I'm sorry to tell you that the problem did NOT go away

eb.

Show
Eric Bottard added a comment - 27/Mar/08 8:15 AM Found it ! If I understand correctly, the db is in SONAR_DIR/data/sonar and so it went away when I deleted the whole dir. So I'm sorry to tell you that the problem did NOT go away eb.
Hide
Permalink
Simon Brandhof added a comment - 27/Mar/08 8:33 AM

Found ! It occurs "only" on some single-module projects. It will be fixed within the 1.3 release.
A great thank to you.

Show
Simon Brandhof added a comment - 27/Mar/08 8:33 AM Found ! It occurs "only" on some single-module projects. It will be fixed within the 1.3 release. A great thank to you.
Hide
Permalink
Eric Bottard added a comment - 27/Mar/08 8:41 AM

Well, you're very welcome.

In the meantime, can I get my hands on a pre-1.3 release ?

eb.

Show
Eric Bottard added a comment - 27/Mar/08 8:41 AM Well, you're very welcome. In the meantime, can I get my hands on a pre-1.3 release ? eb.
Hide
Permalink
Simon Brandhof added a comment - 27/Mar/08 8:50 AM

We started 1.3 developments one hour ago ! It seems too early to publish a pre-release ;o)
But you can try this fix :

edit the file lib/sonar-web/app/controllers/rules_controller.rb and replace the next to last method 'snapshots_hash_by_id' by :

def snapshots_hash_by_id
snapshots = @snapshot.children + [@snapshot]
hash={}
snapshots.each do |s|
hash[s.id]=s
end
hash
end

Please inform me if it works now.

Show
Simon Brandhof added a comment - 27/Mar/08 8:50 AM We started 1.3 developments one hour ago ! It seems too early to publish a pre-release ;o) But you can try this fix : edit the file lib/sonar-web/app/controllers/rules_controller.rb and replace the next to last method 'snapshots_hash_by_id' by :
def snapshots_hash_by_id snapshots = @snapshot.children + [@snapshot] hash={} snapshots.each do |s| hash[s.id]=s end hash end
Please inform me if it works now.
Hide
Permalink
Eric Bottard added a comment - 27/Mar/08 8:58 AM

Well thanks for your quick support, I'm glad to tell you that it DOES work.

Show
Eric Bottard added a comment - 27/Mar/08 8:58 AM Well thanks for your quick support, I'm glad to tell you that it DOES work.
Hide
Permalink
Simon Brandhof added a comment - 28/Mar/08 5:41 AM

Good news. Fix is commited.

Show
Simon Brandhof added a comment - 28/Mar/08 5:41 AM Good news. Fix is commited.
Hide
Permalink
Nicolas Chapon added a comment - 04/Apr/08 10:02 AM

This workaround works for my module in multiple modules project.

But now when i try to see source code i've got this one :

NoMethodError in FileController#source
undefined method `+' for nil:NilClass

Show
Nicolas Chapon added a comment - 04/Apr/08 10:02 AM This workaround works for my module in multiple modules project. But now when i try to see source code i've got this one : NoMethodError in FileController#source undefined method `+' for nil:NilClass
Hide
Permalink
Simon Brandhof added a comment - 04/Apr/08 10:06 AM

Try to re-generate measures by executing the maven plugin. It should resolve the problem.

Show
Simon Brandhof added a comment - 04/Apr/08 10:06 AM Try to re-generate measures by executing the maven plugin. It should resolve the problem.

People

  • Assignee:
    Simon Brandhof
    Reporter:
    Wim Deblauwe
Vote (0)
Watch (1)

Dates

  • Created:
    07/Mar/08 9:26 AM
    Updated:
    27/May/08 7:33 AM
    Resolved:
    28/Mar/08 5:41 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.