sonarqube:违反主要问题'

时间:2015-07-15 09:29:50

标签: sonarqube sonarqube5.1

我在执行分析时遇到以下错误。

有什么办法可以避免吗? 这不是由sonarqube本身完成的吗? 这只是运气问题吗?或者我会一次又一次地得到它?

2015.07.15 11:15:23 ERROR web[o.s.s.c.ComputationThread] Failed to process analysis report 77 of project com.company.dept.QuickLaunch
org.apache.ibatis.exceptions.PersistenceException: 
### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.issue.db.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK__issues__3213E83FDBC62EB5'. Cannot insert duplicate key in object 'dbo.issues'. The duplicate key value is (147442).
### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.issue.db.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK__issues__3213E83FDBC62EB5'. Cannot insert duplicate key in object 'dbo.issues'. The duplicate key value is (147442).
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169) ~[mybatis-3.2.7.jar:3.2.7]
    at org.sonar.core.persistence.DbSession.commit(DbSession.java:61) ~[sonar-core-5.1.jar:na]
    at org.sonar.core.persistence.BatchSession.commit(BatchSession.java:177) ~[sonar-core-5.1.jar:na]
    at org.sonar.core.persistence.BatchSession.increment(BatchSession.java:214) ~[sonar-core-5.1.jar:na]
    at org.sonar.core.persistence.BatchSession.insert(BatchSession.java:134) ~[sonar-core-5.1.jar:na]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:51) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) ~[mybatis-3.2.7.jar:3.2.7]
    at com.sun.proxy.$Proxy104.insert(Unknown Source) ~[na:na]
    at org.sonar.server.computation.step.PersistIssuesStep.execute(PersistIssuesStep.java:79) ~[sonar-server-5.1.jar:na]
    at org.sonar.server.computation.ComputationService.process(ComputationService.java:89) ~[sonar-server-5.1.jar:na]
    at org.sonar.server.computation.ComputationContainer.execute(ComputationContainer.java:47) ~[sonar-server-5.1.jar:na]
    at org.sonar.server.computation.ComputationThread.run(ComputationThread.java:58) ~[sonar-server-5.1.jar:na]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_45]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_45]
Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.core.issue.db.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK__issues__3213E83FDBC62EB5'. Cannot insert duplicate key in object 'dbo.issues'. The duplicate key value is (147442).
    at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174) ~[mybatis-3.2.7.jar:3.2.7]
    ... 19 common frames omitted
Caused by: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK__issues__3213E83FDBC62EB5'. Cannot insert duplicate key in object 'dbo.issues'. The duplicate key value is (147442).
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1069) ~[jtds-1.3.1.jar:1.3.1]
    at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
    at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
    at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103) ~[mybatis-3.2.7.jar:3.2.7]
    ... 24 common frames omitted

0 个答案:

没有答案