这是在带有MS SQL Server 2012数据库的
Windows Server 2012R2上安装的新Sonarqube 5.2
驱动程序:用于SQL Server的Microsoft JDBC驱动程序4.1,版本:4.1.5605.100
分析文件上传正常,但处理作业时,我看到如下错误
2015.12.03 17:11:22 ERROR [o.s.s.c.t.CeWorkerRunnableImpl] Failed to execute task AVFo0pZECnZ7xJR5PoU8 org.apache.ibatis.exceptions.PersistenceException: ### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Cannot insert duplicate key row in object 'dbo.issues' with unique index 'issues_kee'. The duplicate key value is (AVFo0wtzCnZ7xJR5PrRx). ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Cannot insert duplicate key row in object 'dbo.issues' with unique index 'issues_kee'. The duplicate key value is (AVFo0wtzCnZ7xJR5PrRx). 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.db.DbSession.commit(DbSession.java:60) ~[sonar-db-5.2.jar:na] at org.sonar.db.BatchSession.commit(BatchSession.java:176) ~[sonar-db-5.2.jar:na] at org.sonar.db.BatchSession.increment(BatchSession.java:213) ~[sonar-db-5.2.jar:na] at org.sonar.db.BatchSession.insert(BatchSession.java:133) ~[sonar-db-5.2.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.$Proxy103.insert(Unknown Source) ~[na:na] at org.sonar.server.computation.step.PersistIssuesStep.execute(PersistIssuesStep.java:70) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:39) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:53) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.executeTask(CeWorkerRunnableImpl.java:78) [sonar-server-5.2.jar:na] at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.run(CeWorkerRunnableImpl.java:55) [sonar-server-5.2.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_45] at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [na:1.8.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(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]
其中一个项目成功运行了几次,我可以在仪表板中看到结果,但其他项目失败!00%的时间
这是分析中的错误或其他内容吗?
最佳答案 尝试更改SQL排序规则:
https://www.mssqltips.com/sqlservertip/3519/changing-sql-server-collation-after-installation/
您必须具有CS_AS的排序规则.
它对我有用.