如何找到“积极的”快照导致sonarqube升级到5.0失败?(How to find 'a

2019-11-03 15:42发布

我得到了相同的错误朱利安兰斯洛特回答回复:

未能SonarQube升级从4.5到5.0.1

2015.02.18 14:56:26 INFO  web[DbMigration]  ==  PopulateProjectsUuidColumns: migrating ====================================
2015.02.18 14:56:43 ERROR web[o.s.s.d.m.DatabaseMigrator]  Fail to execute database migration: org.sonar.server.db.migrations.v50.PopulateProjectsUuidColum
nsMigration
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.NullPointerException
### Cause: java.lang.NullPointerException
        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.select(DefaultSqlSession.java:130) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.session.defaults.DefaultSqlSession.select(DefaultSqlSession.java:122) ~[mybatis-3.2.7.jar:3.2.7]
        at org.sonar.core.persistence.DbSession.select(DbSession.java:125) ~[sonar-core-5.0.jar:na]
        at org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration.execute(PopulateProjectsUuidColumnsMigration.java:65) ~[sonar-server-5.0.jar:na]

朱利安提到

随着SQL查询和改进的瓶添加一些调试的帮助下,我终于从哪里发出来了发现:id为39554的项目有2个活动快照 (1234385和1234386)。 这个用例不作为管理这绝不应该发生

如何才能辨别所提到的“主动”快照并删除他们,所以这一步成功?

Answer 1:

通过电子邮件朱利安回答,这里是sql

SELECT snapshots.id,COUNT()FROM项目INNER JOIN快照ON snapshots.project_id = projects.id AND snapshots.islast =真GROUP BY snapshots.id HAVING COUNT()> 1



文章来源: How to find 'active' snapshots that cause sonarqube upgrade to 5.0 to fail?