DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index

Adam Gabryś
Hi,
The following error occurred today (we did not do upgrade SonarQube and any plugins):
 
15:15:14 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol:
15:15:14 [ERROR] ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] -> [Help 1]
15:15:14 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
15:15:14 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
15:15:14 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
15:15:14 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
15:15:14 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
15:15:14 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
15:15:14 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
15:15:14 Caused by: org.apache.maven.plugin.MojoExecutionException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
15:15:14 	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
15:15:14 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
15:15:14 	... 19 more
15:15:14 Caused by: org.apache.ibatis.exceptions.PersistenceException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)
15:15:14 	at org.sonar.core.persistence.DbSession.commit(DbSession.java:61)
15:15:14 	at org.sonar.core.persistence.BatchSession.commit(BatchSession.java:177)
15:15:14 	at org.sonar.core.duplication.DuplicationDao.insert(DuplicationDao.java:60)
15:15:14 	at org.sonar.batch.cpd.index.DbDuplicationsIndex.insert(DbDuplicationsIndex.java:134)
15:15:14 	at org.sonar.batch.cpd.index.SonarDuplicationsIndex.insert(SonarDuplicationsIndex.java:51)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.createIndex(JavaCpdEngine.java:151)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.analyse(JavaCpdEngine.java:123)
15:15:14 	at org.sonar.batch.cpd.CpdSensor.execute(CpdSensor.java:96)
15:15:14 	at org.sonar.batch.scan.SensorWrapper.analyse(SensorWrapper.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:51)
15:15:14 	at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:120)
15:15:14 	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
15:15:14 	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
15:15:14 	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
15:15:14 	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
15:15:14 	at java.security.AccessController.doPrivileged(Native Method)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
15:15:14 	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
15:15:14 	at org.sonar.runner.api.Runner.execute(Runner.java:100)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
15:15:14 	... 22 more
15:15:14 Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)
15:15:14 	at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)
15:15:14 	... 66 more
15:15:14 Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:461)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)
15:15:14 	... 71 more
15:15:14 [ERROR] 
15:15:14 [ERROR] 
15:15:14 [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:15:14 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 
Have you got any idea how to fix it?
 
Regards,
    Adam Gabryś
Reply | Threaded
Open this post in threaded view
|

Re: DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index

Adam Gabryś
I made couple tests, history:
- analysis successfully completed from revision X
- next analysis contain 5 revisions  [Y, Z] (Y = X+1, Z = Y + 4]) - finished with error (previous log)
- I run analysis from Y revision – finished with error (the same as previous)
- I run analysis from X revision (last completed successfully) – finished with error (the same as previous).
 
Regards
    Adam Gabryś
 
Sent: Thursday, May 14, 2015 4:08 PM
Subject: [sonar-user] DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index
 
Hi,
The following error occurred today (we did not do upgrade SonarQube and any plugins):
 
15:15:14 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol:
15:15:14 [ERROR] ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] -> [Help 1]
15:15:14 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
15:15:14 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
15:15:14 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
15:15:14 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
15:15:14 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
15:15:14 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
15:15:14 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
15:15:14 Caused by: org.apache.maven.plugin.MojoExecutionException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
15:15:14 	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
15:15:14 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
15:15:14 	... 19 more
15:15:14 Caused by: org.apache.ibatis.exceptions.PersistenceException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)
15:15:14 	at org.sonar.core.persistence.DbSession.commit(DbSession.java:61)
15:15:14 	at org.sonar.core.persistence.BatchSession.commit(BatchSession.java:177)
15:15:14 	at org.sonar.core.duplication.DuplicationDao.insert(DuplicationDao.java:60)
15:15:14 	at org.sonar.batch.cpd.index.DbDuplicationsIndex.insert(DbDuplicationsIndex.java:134)
15:15:14 	at org.sonar.batch.cpd.index.SonarDuplicationsIndex.insert(SonarDuplicationsIndex.java:51)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.createIndex(JavaCpdEngine.java:151)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.analyse(JavaCpdEngine.java:123)
15:15:14 	at org.sonar.batch.cpd.CpdSensor.execute(CpdSensor.java:96)
15:15:14 	at org.sonar.batch.scan.SensorWrapper.analyse(SensorWrapper.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:51)
15:15:14 	at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:120)
15:15:14 	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
15:15:14 	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
15:15:14 	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
15:15:14 	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
15:15:14 	at java.security.AccessController.doPrivileged(Native Method)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
15:15:14 	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
15:15:14 	at org.sonar.runner.api.Runner.execute(Runner.java:100)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
15:15:14 	... 22 more
15:15:14 Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)
15:15:14 	at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)
15:15:14 	... 66 more
15:15:14 Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:461)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)
15:15:14 	... 71 more
15:15:14 [ERROR] 
15:15:14 [ERROR] 
15:15:14 [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:15:14 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 
Have you got any idea how to fix it?
 
Regards,
    Adam Gabryś
Reply | Threaded
Open this post in threaded view
|

Re: DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index

Adam Gabryś
Hi,
Can I remove that row from database?
or
Should I delete project?
 
Help please.
 
Regards,
    Adam Gabryś
 
Sent: Friday, May 15, 2015 10:23 AM
Subject: Re: [sonar-user] DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index
 
I made couple tests, history:
- analysis successfully completed from revision X
- next analysis contain 5 revisions  [Y, Z] (Y = X+1, Z = Y + 4]) - finished with error (previous log)
- I run analysis from Y revision – finished with error (the same as previous)
- I run analysis from X revision (last completed successfully) – finished with error (the same as previous).
 
Regards
    Adam Gabryś
 
Sent: Thursday, May 14, 2015 4:08 PM
Subject: [sonar-user] DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index
 
Hi,
The following error occurred today (we did not do upgrade SonarQube and any plugins):
 
15:15:14 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol:
15:15:14 [ERROR] ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] -> [Help 1]
15:15:14 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
15:15:14 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
15:15:14 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
15:15:14 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
15:15:14 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
15:15:14 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
15:15:14 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
15:15:14 Caused by: org.apache.maven.plugin.MojoExecutionException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
15:15:14 	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
15:15:14 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
15:15:14 	... 19 more
15:15:14 Caused by: org.apache.ibatis.exceptions.PersistenceException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)
15:15:14 	at org.sonar.core.persistence.DbSession.commit(DbSession.java:61)
15:15:14 	at org.sonar.core.persistence.BatchSession.commit(BatchSession.java:177)
15:15:14 	at org.sonar.core.duplication.DuplicationDao.insert(DuplicationDao.java:60)
15:15:14 	at org.sonar.batch.cpd.index.DbDuplicationsIndex.insert(DbDuplicationsIndex.java:134)
15:15:14 	at org.sonar.batch.cpd.index.SonarDuplicationsIndex.insert(SonarDuplicationsIndex.java:51)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.createIndex(JavaCpdEngine.java:151)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.analyse(JavaCpdEngine.java:123)
15:15:14 	at org.sonar.batch.cpd.CpdSensor.execute(CpdSensor.java:96)
15:15:14 	at org.sonar.batch.scan.SensorWrapper.analyse(SensorWrapper.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:51)
15:15:14 	at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:120)
15:15:14 	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
15:15:14 	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
15:15:14 	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
15:15:14 	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
15:15:14 	at java.security.AccessController.doPrivileged(Native Method)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
15:15:14 	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
15:15:14 	at org.sonar.runner.api.Runner.execute(Runner.java:100)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
15:15:14 	... 22 more
15:15:14 Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)
15:15:14 	at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)
15:15:14 	... 66 more
15:15:14 Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:461)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)
15:15:14 	... 71 more
15:15:14 [ERROR] 
15:15:14 [ERROR] 
15:15:14 [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:15:14 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 
Have you got any idea how to fix it?
 
Regards,
    Adam Gabryś
Reply | Threaded
Open this post in threaded view
|

Re: DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index

Adam Gabryś
Hi,
Probably I found the cause of the error. We exceeded the maximum identifier value in the duplications_index table. Our current value is equal 2,147,483,616 and the maximum is 2,147,483,647 (available rows: 31). If the analysis generates more duplication then error occurs. Now we disabled the detection of duplication between projects and this temporarily solved the problem.
 
Maybe a comprehensive solution would be replacing all the identifiers from integers to longs?
 
Regards,
    Adam Gabryś
 
Sent: Monday, May 18, 2015 11:19 AM
Subject: Re: [sonar-user] DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index
 
Hi,
Can I remove that row from database?
or
Should I delete project?
 
Help please.
 
Regards,
    Adam Gabryś
 
Sent: Friday, May 15, 2015 10:23 AM
Subject: Re: [sonar-user] DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index
 
I made couple tests, history:
- analysis successfully completed from revision X
- next analysis contain 5 revisions  [Y, Z] (Y = X+1, Z = Y + 4]) - finished with error (previous log)
- I run analysis from Y revision – finished with error (the same as previous)
- I run analysis from X revision (last completed successfully) – finished with error (the same as previous).
 
Regards
    Adam Gabryś
 
Sent: Thursday, May 14, 2015 4:08 PM
Subject: [sonar-user] DuplicationMapper.batchInsert : Batch entry 0 INSERT INTO duplications_index
 
Hi,
The following error occurred today (we did not do upgrade SonarQube and any plugins):
 
15:15:14 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol:
15:15:14 [ERROR] ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14 [ERROR] VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 [ERROR] -> [Help 1]
15:15:14 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
15:15:14 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
15:15:14 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
15:15:14 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
15:15:14 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
15:15:14 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
15:15:14 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
15:15:14 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
15:15:14 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
15:15:14 Caused by: org.apache.maven.plugin.MojoExecutionException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
15:15:14 	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
15:15:14 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
15:15:14 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
15:15:14 	... 19 more
15:15:14 Caused by: org.apache.ibatis.exceptions.PersistenceException: 
15:15:14 ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)
15:15:14 	at org.sonar.core.persistence.DbSession.commit(DbSession.java:61)
15:15:14 	at org.sonar.core.persistence.BatchSession.commit(BatchSession.java:177)
15:15:14 	at org.sonar.core.duplication.DuplicationDao.insert(DuplicationDao.java:60)
15:15:14 	at org.sonar.batch.cpd.index.DbDuplicationsIndex.insert(DbDuplicationsIndex.java:134)
15:15:14 	at org.sonar.batch.cpd.index.SonarDuplicationsIndex.insert(SonarDuplicationsIndex.java:51)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.createIndex(JavaCpdEngine.java:151)
15:15:14 	at org.sonar.batch.cpd.JavaCpdEngine.analyse(JavaCpdEngine.java:123)
15:15:14 	at org.sonar.batch.cpd.CpdSensor.execute(CpdSensor.java:96)
15:15:14 	at org.sonar.batch.scan.SensorWrapper.analyse(SensorWrapper.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:59)
15:15:14 	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:51)
15:15:14 	at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:120)
15:15:14 	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
15:15:14 	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
15:15:14 	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
15:15:14 	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
15:15:14 	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
15:15:14 	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
15:15:14 	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
15:15:14 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
15:15:14 	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:15:14 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:15:14 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:15:14 	at java.lang.reflect.Method.invoke(Method.java:497)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
15:15:14 	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
15:15:14 	at java.security.AccessController.doPrivileged(Native Method)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
15:15:14 	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
15:15:14 	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
15:15:14 	at org.sonar.runner.api.Runner.execute(Runner.java:100)
15:15:14 	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
15:15:14 	... 22 more
15:15:14 Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.duplication.DuplicationMapper.batchInsert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)
15:15:14 	at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)
15:15:14 	at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)
15:15:14 	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)
15:15:14 	... 66 more
15:15:14 Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line)
15:15:14     VALUES (26971831, 26971771, '8656f27ffab25517', 0, 21, 46) was aborted.  Call getNextException to see the cause.
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:461)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
15:15:14 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
15:15:14 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
15:15:14 	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)
15:15:14 	... 71 more
15:15:14 [ERROR] 
15:15:14 [ERROR] 
15:15:14 [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:15:14 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 
Have you got any idea how to fix it?
 
Regards,
    Adam Gabryś