在数据库升级期间,从SonarQube 4.0升级到5.0.1失败。我跟着these instructions,但设置没有完成:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SONAR.RULES_REPO_KEY) violated
### The error may involve org.sonar.core.rule.RuleMapper.insert-Inline
### The error occurred while setting parameters
### SQL: insert into rules (plugin_rule_key, plugin_name, description, description_format, status, name, plugin_config_key, priority, is_template, language, template_id, characteristic_id, default_characteristic_id, remediation_function, default_remediation_function, remediation_coeff, default_remediation_coeff, remediation_offset, default_remediation_offset, effort_to_fix_description, tags, system_tags, note_data, note_user_login, note_created_at, note_updated_at, created_at, updated_at) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SONAR.RULES_REPO_KEY) violated
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154)
org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:141)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:51)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
com.sun.proxy.$Proxy79.insert(Unknown Source)
org.sonar.server.rule.db.RuleDao.doInsert(RuleDao.java:58)
org.sonar.server.rule.db.RuleDao.doInsert(RuleDao.java:36)
org.sonar.server.db.BaseDao.insert(BaseDao.java:243)
org.sonar.server.db.BaseDao.insert(BaseDao.java:218)
org.sonar.server.rule.RegisterRules.createRuleDto(RegisterRules.java:224)
org.sonar.server.rule.RegisterRules.registerRule(RegisterRules.java:130)
org.sonar.server.rule.RegisterRules.start(RegisterRules.java:106)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:483)
org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
org.picocontainer.behaviors.Stored.start(Stored.java:110)
org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
org.sonar.server.platform.ServerComponents$1.doPrivileged(ServerComponents.java:665)
org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:43)
org.sonar.server.platform.ServerComponents.executeStartupTasks(ServerComponents.java:661)
org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:126)
org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:122)
org.sonar.server.platform.Platform.doStart(Platform.java:81)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:483)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:440)
org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:304)
org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:52)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
org.jruby.runtime.BlockBody.call(BlockBody.java:73)
org.jruby.runtime.Block.call(Block.java:101)
org.jruby.RubyProc.call(RubyProc.java:290)
org.jruby.RubyProc.call(RubyProc.java:228)
org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:97)
java.lang.Thread.run(Thread.java:745)
我希望我能正确升级插件:编辑:...但我没有。
-rwx------+ 1 pwillems Domain Users 1366553 Nov 12 2012 CSharpPluginsEcosystem-1.4.zip
-rwx------+ 1 pwillems Domain Users 105 Mar 5 13:53 README.txt
drwx------+ 1 Administrators Domain Users 0 Mar 6 12:41 findbugs-2.0.1
-rwx------+ 1 pwillems Domain Users 29436 Jul 12 2012 findbugs-ant.jar
drwx------+ 1 pwillems Domain Users 0 Mar 10 12:58 not for 4.0
drwx------+ 1 pwillems Domain Users 0 Mar 6 16:16 obsolete Java 2.4
-rwx------+ 1 pwillems Domain Users 9205 Mar 5 12:21 sonar-branding-plugin-1.0.jar
-rwx------+ 1 Administrators Domain Users 2014901 Mar 6 11:19 sonar-checkstyle-plugin-2.2.jar
-rwx------+ 1 Administrators Domain Users 10325 Mar 6 11:34 sonar-cobertura-plugin-1.6.3.jar
-rwx------+ 1 pwillems Domain Users 917316 Mar 6 09:42 sonar-csharp-plugin-3.3.jar
-rwx------+ 1 pwillems Domain Users 7247 Nov 28 2012 sonar-csv-export-plugin-1.3.jar
-rwx------+ 1 pwillems Domain Users 102668 Nov 18 2013 sonar-dotnet-fxcop-plugin-2.1.jar
-rwx------+ 1 pwillems Domain Users 84620 Nov 18 2013 sonar-dotnet-gallio-plugin-2.1.jar
-rwx------+ 1 pwillems Domain Users 624800 Nov 18 2013 sonar-dotnet-gendarme-plugin-2.1.jar
-rwx------+ 1 pwillems Domain Users 280291 Nov 18 2013 sonar-dotnet-ndeps-plugin-2.1.jar
-rwx------+ 1 pwillems Domain Users 59047 Nov 18 2013 sonar-dotnet-plugin-2.1.jar
-rwx------+ 1 Administrators Domain Users 1012812 Mar 6 11:37 sonar-issues-report-plugin-1.3.jar
-rwx------+ 1 Administrators Domain Users 2468589 Mar 6 11:04 sonar-java-plugin-3.0.jar
-rwx------+ 1 pwillems Domain Users 30646 Feb 4 2014 sonar-ldap-plugin-1.4.jar
-rwx------+ 1 pwillems Domain Users 857763 Sep 16 13:08 sonar-plsql-plugin-2.6.jar
-rwx------+ 1 Administrators Domain Users 3568440 Mar 6 11:20 sonar-pmd-plugin-2.3.jar
drwx------+ 1 Administrators Domain Users 0 Mar 6 12:41 sonar-runner-2.0
-rwx------+ 1 pwillems Domain Users 36019 Mar 6 09:42 sonar-stylecop-plugin-1.1.jar
-rwx------+ 1 pwillems Domain Users 26259 Mar 6 09:42 sonar-visual-studio-plugin-1.2.jar
这是sonar.log最近的历史记录:
2015.03.10 13:14:40 INFO web[o.s.s.s.IndexSynchronizer] Index source files
2015.03.10 13:15:40 INFO web[o.s.s.es.BulkIndexer] 204829 requests processed
2015.03.10 13:16:40 INFO web[o.s.s.es.BulkIndexer] 488960 requests processed
2015.03.10 13:17:40 INFO web[o.s.s.es.BulkIndexer] 769172 requests processed
2015.03.10 13:18:41 INFO web[o.s.s.es.BulkIndexer] 1009002 requests processed
2015.03.10 13:19:41 INFO web[o.s.s.es.BulkIndexer] 1302412 requests processed
2015.03.10 13:20:41 INFO web[o.s.s.es.BulkIndexer] 1608777 requests processed
2015.03.10 13:21:21 INFO web[o.s.a.u.TimeProfiler] Load metrics...
2015.03.10 13:21:22 INFO web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions
2015.03.10 13:21:22 INFO web[o.s.a.u.TimeProfiler] Load metrics done: 953 ms
2015.03.10 13:21:22 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model...
2015.03.10 13:21:22 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model done: 78 ms
2015.03.10 13:21:22 INFO web[o.s.a.u.TimeProfiler] Register rules...
2015.03.10 13:21:35 INFO web[o.s.a.u.TimeProfiler] Register rules done: 12985 ms
2015.03.10 13:21:35 ERROR web[o.s.s.ui.JRubyFacade] Fail to upgrade database
调查或尝试什么有用?任何帮助表示赞赏。
答案 0 :(得分:0)
声纳-netnet - * - 插件打破了升级。它们已经过时(见outdated C# Ecosystem),必须删除。
当我注意到这些插件未通过"迁移"一个空数据库。