在声纳从5.0更新到5.1期间,我收到了以下错误
迁移失败:不得在参数上设置默认值 ' API /视图/项目的pageSize'因为它被标记为必需。请 检查日志。
更新流程从http://localhost:9000/setup开始 我按照http://docs.sonarqube.org/display/SONAR/Upgrading
的更新指南进行了操作如何解决该错误并继续进行更新?
修改
我正在从嵌入式H2数据库迁移到postgress,所以我不介意丢失数据库中的所有数据。我从头开始droped并创建了数据库。 Sonar开始在数据库中创建表,但Web UI不可访问。我收到了同样的错误 - 这次直接在浏览器中显示。
我还删除了 / opt / sonar / extensions / plugins 的大部分内容
声纳的集结断路器插件-1.1.jar
声纳FindBugs的-插件-3.2.jar
声纳的Java插件-3.1.jar
声纳JIRA-插件-1.2.jar
声纳的视图-插件-2.7.jar
但错误仍然存在。
日志:
2015.04.08 11:39:31 ERROR web[o.s.s.ui.JRubyFacade] Fail to upgrade database
Default value must not be set on parameter 'api/views/projects?pageSize' as it's marked as required
org.sonar.api.server.ws.WebService$Param.<init>(WebService.java:601)
org.sonar.api.server.ws.WebService$Action.<init>(WebService.java:398)
org.sonar.api.server.ws.WebService$Action.<init>(WebService.java:374)
org.sonar.api.server.ws.WebService$Controller.<init>(WebService.java:206)
org.sonar.api.server.ws.WebService$Controller.<init>(WebService.java:192)
org.sonar.api.server.ws.WebService$Context.register(WebService.java:126)
org.sonar.api.server.ws.WebService$Context.access$300(WebService.java:105)
org.sonar.api.server.ws.WebService$NewController.done(WebService.java:161)
com.sonar.views.A.L.define(Unknown Source)
org.sonar.server.ws.WebServiceEngine.<init>(WebServiceEngine.java:55)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:422)
org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:145)
org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:342)
org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1033)
org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1025)
org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
org.sonar.server.platform.ServerComponents.startLevel4Components(ServerComponents.java:821)
org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:120)
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:497)
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)
答案 0 :(得分:1)
Views插件是罪魁祸首。使用5.1,您必须安装Views 2.8。
答案 1 :(得分:0)
通过从 / opt / sonar / extensions / plugins 目录中删除所有插件,然后从更新中心逐个重新安装它们来解决问题({{3 }})。