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-1143

NonUniqueResultException when mvn sonar:sonar on a module after mvn sonar:sonar on the parent

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.1
  • Fix Version/s: 1.11
  • Component/s: Maven Plugin
  • Labels:
    None

Description

After running successfully mvn sonar:sonar on a submodule then on the parent, mvn sonar:sonar fails with an NonUniqueResultException on the submodule.
Cause by org.sonar.batch.core.FinalizeSnapshotsJob.getPreviousLastSnapshot, which don't take care of depth and path to retrieve previous snapshot.

First run of sonar on the submodule create a snapshot for itself.
id created_at project_id parent_snapshot_id status islast scope qualifier root_snapshot_id version path depth
627 2009-09-22 10:04:43 7 NULL P 1 PRJ BRC NULL 1.0-SNAPSHOT 0

Run of sonar on the parent create a snapshot on the database for itself and all it submodule.
id created_at project_id parent_snapshot_id status islast scope qualifier root_snapshot_id version path depth
936 2009-09-22 20:29:23 1 NULL P 1 PRJ TRK NULL 1.0-SNAPSHOT 0
942 2009-09-22 20:29:36 7 936 P 1 PRJ BRC 936 1.0-SNAPSHOT 936. 1

When re-running sonar on the submodule, FinalizeSnapshotsJob.getPreviousLastSnapshot watch only on islast flag, and not for depth and islast.
And the request return the 2 snapshots, the one from the parent and the one from the submodule, causing the exception (session.getSingleResult()).

Way to reproduce:

  • create a project with a submodule
  • run mvn clean install sonar:sonar on the submodule (success)
  • run mvn clean install sonar:sonar on the parent (success)
  • run again mvn clean install sonar:sonar on the submodule (fail)

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. SONAR-721 Purge last snapshot on a Maven project which has became a Maven module

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Nicolas Vinot
Vote (0)
Watch (1)

Dates

  • Created:
    22/Sep/09 2:13 PM
    Updated:
    25/Sep/09 6:01 AM
    Resolved:
    25/Sep/09 6:01 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.