* SonarQube 5.1.1.
I ran an analysis on a project which is not small (more than 800k lines of code) and failed to set a measure; the problem is that I don't know which measure it is, the stack trace on the sonar runner side does not tell, and there is nothing in sonar.log...
09:39:12.998 INFO - Store results in database
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1:22:42.539s
Final Memory: 32M/1471M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Unable to save some measures
at org.sonar.batch.index.MeasurePersister.persist(MeasurePersister.java:78)
at org.sonar.batch.phases.DatabaseModePhaseExecutor.executePersisters(DatabaseModePhaseExecutor.java:165)
at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:133)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.api.database.model.MeasureMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 45 INSERT INTO project_measures (
value, metric_id, snapshot_id, rule_id, text_value, tendency,
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id, measure_data)
VALUES (
4.8333909955782E12, 269, 171618, NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL
) was aborted. Call getNextException to see the cause.
### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.api.database.model.MeasureMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 45 INSERT INTO project_measures (
value, metric_id, snapshot_id, rule_id, text_value, tendency,
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id, measure_data)
VALUES (
4.8333909955782E12, 269, 171618, NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL
) was aborted. Call getNextException to see the cause.
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)
at org.sonar.core.persistence.DbSession.commit(DbSession.java:61)
at org.sonar.core.persistence.BatchSession.commit(BatchSession.java:177)
at org.sonar.core.persistence.BatchSession.increment(BatchSession.java:214)
at org.sonar.core.persistence.BatchSession.insert(BatchSession.java:134)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:51)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
at com.sun.proxy.$Proxy78.insert(Unknown Source)
at org.sonar.batch.index.MeasurePersister.persist(MeasurePersister.java:72)
... 33 more
Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.api.database.model.MeasureMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 45 INSERT INTO project_measures (
value, metric_id, snapshot_id, rule_id, text_value, tendency,
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id, measure_data)
VALUES (
4.8333909955782E12, 269, 171618, NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL
) was aborted. Call getNextException to see the cause.
at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)
at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)
at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)
at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)
at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)
... 42 more
Caused by: java.sql.BatchUpdateException: Batch entry 45 INSERT INTO project_measures (
value, metric_id, snapshot_id, rule_id, text_value, tendency,
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id, measure_data)
VALUES (
4.8333909955782E12, 269, 171618, NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL
) was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:461)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)
... 47 more