29 July 2011

Can not execute Sonar PicoLifecycleException NonUniqueResultException

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running edu.emmerson.test.sonar.comunicacion.comun.basicos.ElementoTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.097 sec

Results :

Tests run: 9, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Building MultiModulo - Comun
[INFO] task-segment: [sonar:sonar, es.klicap.sonar:pdf-report:1.1:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar {execution: default-cli}]
[INFO] Sonar host: http://localhost/sonar
[INFO] Sonar version: 2.8
[INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:2.8:sonar
[INFO] [sonar:sonar {execution: default-sonar}]
[INFO] Database dialect class org.sonar.jpa.dialect.MySql
[INFO] Initializing Hibernate
[INFO] Execution environment: Maven 2.2.1
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: PicoLifecycleException: method 'public void org.sonar.batch.ProjectTree.start() throws java.io.IOException', instance 'org.sonar.batch.ProjectTree@42304230, javax.persistence.NonUniqueResultException: Expected single result, but got : [Snapshot[resourceId=3810,createdAt=...
...
......
20:08:32.0,period4Date=<null>,period5Date=<null>,id=40302]]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Thu Jul 28 20:10:13 CEST 2011
[INFO] Final Memory: 22M/92M
[INFO] ------------------------------------------------------------------------
Sending e-mails to: miMailPersonal@servidor.es
Finished: FAILURE

Solución aplicada (no siempre recomendable):

Ir al sonar y borrar el proyecto desde la consola de administración.

Enlaces relacionados:

http://comments.gmane.org/gmane.comp.java.sonar.general/9398

- FIN -

No comments: