Sonarqube从4.5.1升级到5.1失败

时间:2015-04-27 15:06:46

标签: mysql sonarqube upgrade

我正在从SonarQube 4.5.1升级到5.1,并且数据库迁移失败,并显示以下内容:

2015.04.27 10:47:47 INFO  web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on OpenJDK 64-Bit Server VM 1.7.0_79-mockbuild_2015_04_10_10_52-b00 [linux-amd64]
2015.04.27 10:47:47 INFO  web[jruby.rack] using a shared (threadsafe!) runtime
2015.04.27 10:47:57 INFO  web[jruby.rack] keeping custom (config.logger) Rails logger instance
2015.04.27 10:47:58 INFO  web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.04.27 10:47:58 INFO  web[o.s.s.a.TomcatAccessLog] Web server is started
2015.04.27 10:47:58 INFO  web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2015.04.27 10:47:58 INFO  app[o.s.p.m.Monitor] Process[web] is up
2015.04.27 10:49:30 INFO  web[DbMigration] ==  PopulateProjectsUuidColumns: migrating ====================================
2015.04.27 10:49:36 ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute database migration: org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration
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.1.jar:na]
        at org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration.execute(PopulateProjectsUuidColumnsMigration.java:65) ~[sonar-server-5.1.jar:na]
        at org.sonar.server.db.migrations.DatabaseMigrator.executeMigration(DatabaseMigrator.java:94) ~[sonar-server-5.1.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_79]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_79]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455) [jruby-complete-1.7.9.jar:na]
        at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) [jruby-complete-1.7.9.jar:na]
        at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61) [jruby-complete-1.7.9.jar:na]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na]
        at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na]
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na]
        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na]
        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na]
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) [jruby-complete-1.7.9.jar:na]
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na]
....
        at org.jruby.RubyProc.call(RubyProc.java:290) [jruby-complete-1.7.9.jar:na]
        at org.jruby.RubyProc.call(RubyProc.java:228) [jruby-complete-1.7.9.jar:na]
        at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:97) [jruby-complete-1.7.9.jar:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: java.lang.NullPointerException: null
        at org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration.updateComponent(PopulateProjectsUuidColumnsMigration.java:142) ~[sonar-server-5.1.jar:na]
        at org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration.migrateEnabledComponents(PopulateProjectsUuidColumnsMigration.java:108) ~[sonar-server-5.1.jar:na]
        at org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration.access$000(PopulateProjectsUuidColumnsMigration.java:48) ~[sonar-server-5.1.jar:na]
        at org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigration$1.handleResult(PopulateProjectsUuidColumnsMigration.java:70) ~[sonar-server-5.1.jar:na]
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.callResultHandler(DefaultResultSetHandler.java:306) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.storeObject(DefaultResultSetHandler.java:300) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:292) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:266) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:239) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:150) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:60) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:57) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77) ~[mybatis-3.2.7.jar:3.2.7]
        at org.apache.ibatis.session.defaults.DefaultSqlSession.select(DefaultSqlSession.java:128) ~[mybatis-3.2.7.jar:3.2.7]

我添加了#34; sonar.log.profilingLevel = FULL"到sonar.properties但我没有得到任何其他信息。

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:1)

此错误在版本5.1.1和5.2中得到修复。见https://jira.codehaus.org/browse/SONAR-6493。 很抱歉给您带来不便。