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

Removing a detached instance of org.sonar.api.Batch.Event

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 2.5
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

The following error has occured when performing sonar run:

It is unclear exactly which actions has caused this exception

[ERROR] BUILD ERROR
[01:11:18]: [INFO] ------------------------------------------------------------------------
[01:11:18]: [INFO] Can not execute Sonar
[01:11:18]: Embedded error: Removing a detached instance org.sonar.api.batch.Event#671
[01:11:18]: [INFO] Trace
[01:11:18]: org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
[01:11:18]: at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
[01:11:18]: at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
[01:11:18]: at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
[01:11:18]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[01:11:18]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[01:11:18]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[01:11:18]: at java.lang.reflect.Method.invoke(Method.java:597)
[01:11:18]: at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[01:11:18]: at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[01:11:18]: at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[01:11:18]: at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[01:11:18]: Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
[01:11:18]: at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
[01:11:18]: at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
[01:11:18]: at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
[01:11:18]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
[01:11:18]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
[01:11:18]: ... 16 more
[01:11:18]: Caused by: java.lang.IllegalArgumentException: Removing a detached instance org.sonar.api.batch.Event#671
[01:11:18]: at org.hibernate.ejb.event.EJB3DeleteEventListener.performDetachedEntityDeletionCheck(EJB3DeleteEventListener.java:45)
[01:11:18]: at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:108)
[01:11:18]: at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:74)
[01:11:18]: at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:794)
[01:11:18]: at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:772)
[01:11:18]: at org.hibernate.ejb.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:253)
[01:11:18]: at org.sonar.jpa.session.JpaDatabaseSession.remove(JpaDatabaseSession.java:123)
[01:11:18]: at org.sonar.batch.index.EventPersister.deleteEvent(EventPersister.java:49)
[01:11:18]: at org.sonar.batch.index.DefaultPersistenceManager.deleteEvent(DefaultPersistenceManager.java:98)
[01:11:18]: at org.sonar.batch.index.DefaultIndex.deleteEvent(DefaultIndex.java:448)
[01:11:18]: at org.sonar.batch.DefaultSensorContext.deleteEvent(DefaultSensorContext.java:153)
[01:11:18]: at org.sonar.plugins.core.sensors.VersionEventsSensor.deleteDeprecatedEvents(VersionEventsSensor.java:64)
[01:11:18]: at org.sonar.plugins.core.sensors.VersionEventsSensor.analyse(VersionEventsSensor.java:43)
[01:11:18]: at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:60)
[01:11:18]: at org.sonar.batch.phases.Phases.execute(Phases.java:72)
[01:11:18]: at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:61)
[01:11:18]: at org.sonar.batch.Batch.analyzeModule(Batch.java:149)
[01:11:18]: at org.sonar.batch.Batch.analyzeModules(Batch.java:106)
[01:11:18]: at org.sonar.batch.Batch.execute(Batch.java:66)
[01:11:18]: at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142)
[01:11:18]: at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133)
[01:11:18]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
[01:11:18]: at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
[01:11:18]: ... 20 more

Issue Links

is duplicated by

Bug - A problem which impairs or prevents the functions of the product. SONAR-2579 Creating an event through the web service API leads to a org.sonar.api.Batch.Event exception

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

Bug - A problem which impairs or prevents the functions of the product. SONAR-3308 Removing a detached instance org.sonar.api.batch.Event

  • Major - Major loss of function.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.
relates to

Bug - A problem which impairs or prevents the functions of the product. SONAR-2579 Creating an event through the web service API leads to a org.sonar.api.Batch.Event exception

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

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Freddy Mallet added a comment - 22/Feb/11 3:10 AM

Hi Serhiy, I guess this error has occurred only once ?

Show
Freddy Mallet added a comment - 22/Feb/11 3:10 AM Hi Serhiy, I guess this error has occurred only once ?
Hide
Permalink
Serhiy Yevtushenko added a comment - 22/Feb/11 3:13 AM

There was new measurement added. After this failure I have removed it - then it stopped from happening. I have not tried adding new measurements after that - as have running sonar was of higher importance

Show
Serhiy Yevtushenko added a comment - 22/Feb/11 3:13 AM There was new measurement added. After this failure I have removed it - then it stopped from happening. I have not tried adding new measurements after that - as have running sonar was of higher importance
Hide
Permalink
Freddy Mallet added a comment - 22/Feb/11 3:15 AM

This VersionEventsSensor is used to manage the version of your Maven project. Do you remember any special change that occurred on your project version at that time ?

Show
Freddy Mallet added a comment - 22/Feb/11 3:15 AM This VersionEventsSensor is used to manage the version of your Maven project. Do you remember any special change that occurred on your project version at that time ?
Hide
Permalink
Serhiy Yevtushenko added a comment - 22/Feb/11 3:37 AM

The current practice on the project (established not by me) is that before production release all version are build with 1.0 tag (which is removed and then added back during build). As well, there were one case, when version 1.1. was set (and then removed, and set back to 1.0). This is not the maven recommended way - but that how things are done.

Show
Serhiy Yevtushenko added a comment - 22/Feb/11 3:37 AM The current practice on the project (established not by me) is that before production release all version are build with 1.0 tag (which is removed and then added back during build). As well, there were one case, when version 1.1. was set (and then removed, and set back to 1.0). This is not the maven recommended way - but that how things are done.
Hide
Permalink
Freddy Mallet added a comment - 19/Apr/11 2:42 PM

Hi Serhiy, I'm closing this ticket because we both can't manage to reproduce it.

Show
Freddy Mallet added a comment - 19/Apr/11 2:42 PM Hi Serhiy, I'm closing this ticket because we both can't manage to reproduce it.
Hide
Permalink
cipher chain added a comment - 07/Jul/11 1:12 AM

I'm able to consistently reproduce this issue. Steps I took to replicate on version 2.8:

  1. Create events using WebService API
  2. Run analysis
Show
cipher chain added a comment - 07/Jul/11 1:12 AM I'm able to consistently reproduce this issue. Steps I took to replicate on version 2.8:
  1. Create events using WebService API
  2. Run analysis

People

  • Assignee:
    Unassigned
    Reporter:
    Serhiy Yevtushenko
Vote (0)
Watch (0)

Dates

  • Created:
    14/Feb/11 4:55 AM
    Updated:
    07/Mar/12 3:27 PM
    Resolved:
    19/Apr/11 2:42 PM
  • 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.