【发布时间】:2017-12-03 12:54:30
【问题描述】:
在数据库迁移失败消息后,我尝试将 Sonarqube 从 5.6.6 (LTS) 升级到 6.4,并在 web.log 文件中收到此异常:
2017.06.29 11:21:32 错误 web[][DbMigrations] #1241 '清除表 DUPLICATION_INDEX 中的孤立行':失败 |时间=43ms 2017.06.29 11:21:32 错误 web[][DbMigrations] 执行的数据库迁移:失败 |时间=802094ms 2017.06.29 11:21:32 错误 web[][o.s.s.p.d.m.DatabaseMigrationImpl] 数据库迁移失败 |时间=802170ms 2017.06.29 11:21:32 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] 数据库迁移以异常结束 org.sonar.server.platform.db.migration.step.MigrationStepExecutionException:执行迁移步骤 #1241 'Clean orphan rows in table DUPLICATION_INDEX' failed 在 org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79) 在 org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67) 在 java.util.Iterator.forEachRemaining(Iterator.java:116) 在 java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) 在 java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:590) 在 org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52) 在 org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:50) 在 org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:130) 在 org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:105) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745) 引起:java.sql.SQLSyntaxErrorException:ORA-00904:“ID”:无效标识符我查看了 DUPLICATIONS_INDEX 表,但没有找到 ID 列。
我最近从 5.4 升级到 5.6.6 并且工作正常。
有什么解决方法吗?考虑将数据库恢复到 5.6.6 并尝试升级到 6.0,然后从 6.1 升级到 6.4。
更新:
我尝试了 6.0 版,但在 sonar.log 文件中遇到了一个巨大的异常:
2017.06.29 16:23:55 INFO web[DbMigration] == DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis: 迁移 ==== 2017.06.29 16:23:55 错误 web[o.s.s.d.m.DatabaseMigrator] 无法执行数据库迁移:org.sonar.db.version.v60.DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis java.sql.SQLSyntaxErrorException: ORA-00904: "ID": identificador inválido 在 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657) ~[ojdbc6.jar:11.2.0.4.0] 在 oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495) ~[ojdbc6.jar:11.2.0.4.0] 在 org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) ~[commons-dbcp-1.4.jar:1.4] 在 org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) ~[commons-dbcp-1.4.jar:1.4] 在 org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:74) ~[sonar-db-6.0.jar:na] 在 org.sonar.db.version.MassUpdate.execute(MassUpdate.java:91) ~[sonar-db-6.0.jar:na] 在 org.sonar.db.version.v60.DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis.deleteRowsWithoutComponentUuid(DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis.java:44)~[sonar-db-6.0.jar:na] 在 org.sonar.db.version.v60.DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis.execute(DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis.java:35) ~[sonar-db-6.0.jar:na] 在 org.sonar.db.version.BaseDataChange.execute(BaseDataChange.java:45) ~[sonar-db-6.0.jar:na] 在 org.sonar.server.db.migrations.DatabaseMigrator.executeMigration(DatabaseMigrator.java:95) ~[sonar-server-6.0.jar:na] 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] 在 java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] 在 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455) [jruby-complete-1.7.9.jar:na] 在 org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) [jruby-complete-1.7.9.jar:na] 在 org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyClass.finvoke(RubyClass.java:527) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyKernel.send(RubyKernel.java:2223) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.Block.yieldSpecific(Block.java:111) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:204) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:206) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyClass.finvoke(RubyClass.java:567) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyBasicObject.send(RubyBasicObject.java:2595) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyKernel.send(RubyKernel.java:2227) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:356) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:213) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:217) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallSpecialArgBlockPassNode.interpret(CallSpecialArgBlockPassNode.java:66) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.RescueNode.executeBody(RescueNode.java:221) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.RescueNode.interpret(RescueNode.java:116) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.BlockBody.call(BlockBody.java:73) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.Block.call(Block.java:101) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyProc.call(RubyProc.java:290) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyProc.call(RubyProc.java:224) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.IfNode.interpret(IfNode.java:118) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.RescueNode.executeBody(RescueNode.java:221) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.RescueNode.interpret(RescueNode.java:116) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.BeginNode.interpret(BeginNode.java:83) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:357) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:312) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.Block.yield(Block.java:142) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyArray.eachCommon(RubyArray.java:1606) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyArray.each(RubyArray.java:1613) [jruby-complete-1.7.9.jar:na] 在 org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:214) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:346) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.WhenOneArgNode.whenNoTest(WhenOneArgNode.java:27) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.WhenOneArgNode.when(WhenOneArgNode.java:45) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CaseNode.interpret(CaseNode.java:132) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306) [jruby-complete-1.7.9.jar:na] 在 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60) [jruby-complete-1.7.9.jar:na] 在 org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) [jruby-complete-1.7.9.jar:na] 在 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:112) [jruby-complete-1.7.9.jar:na] 在 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:164) [jruby-complete-1.7.9.jar:na] 在 RbCallUpgrade_1310678998.callUpgrade(RbCallUpgrade_1310678998.gen:13) [jruby-complete-1.7.9.jar:na] 在 org.sonar.server.db.migrations.PlatformDatabaseMigration.doUpgradeDb(PlatformDatabaseMigration.java:126) ~[sonar-server-6.0.jar:na] 在 org.sonar.server.db.migrations.PlatformDatabaseMigration.doDatabaseMigration(PlatformDatabaseMigration.java:108) ~[sonar-server-6.0.jar:na] 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_121] 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_121] 在 java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_121] 2017.06.29 16:23:55 INFO web[o.s.s.d.m.PlatformDatabaseMigration] 数据库迁移失败 |时间=5397ms 2017.06.29 16:23:55 错误 web[o.s.s.d.m.PlatformDatabaseMigration] 数据库迁移或容器重启失败。进程以异常结束 org.jruby.exceptions.RaiseException: (StandardError) 发生错误,所有以后的迁移都取消了: 执行数据库迁移失败:org.sonar.db.version.v60.DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis由于表中不存在ID列且表为空,我创建了该列并重新启动了数据库迁移。
做对了吗?
【问题讨论】:
标签: sonarqube database-migration sonarqube-ops