声纳更新失败 [不能在参数 'api/views/projects?pageSize' 上设置默认值,因为它被标记为必需]
Sonar update failure [ Default value must not be set on parameter 'api/views/projects?pageSize' as it's marked as required]
声纳从 5.0 更新到 5.1 时出现以下错误
Migration failed: Default value must not be set on parameter
'api/views/projects?pageSize' as it's marked as required . Please
check logs.
更新过程从 http://localhost:9000/setup 开始
我遵循了 http://docs.sonarqube.org/display/SONAR/Upgrading
上的更新指南
如何解决该错误并继续更新?
编辑:
我正在从嵌入式 H2 数据库迁移到 postgress,所以我不介意丢失数据库中的所有数据。我从头开始删除并创建了数据库。
Sonar 已启动,在数据库中创建了表,但无法访问 Web UI。我遇到了同样的错误 - 这次直接显示在浏览器中。
我也删除了大部分 /opt/sonar/extensions/plugins 只留下
sonar-build-breaker-plugin-1.1.jar
sonar-findbugs-plugin-3.2.jar
sonar-java-plugin-3.1.jar
sonar-jira-plugin-1.2.jar
sonar-views-plugin-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.access0(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.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)
问题已通过从 /opt/sonar/extensions/plugins 目录中删除 所有 插件,然后从更新中逐个重新安装它们来解决中心 (http://localhost/updatecenter/available).
Views 插件是罪魁祸首。使用 5.1,您必须安装 Views 2.8。
声纳从 5.0 更新到 5.1 时出现以下错误
Migration failed: Default value must not be set on parameter 'api/views/projects?pageSize' as it's marked as required . Please check logs.
更新过程从 http://localhost:9000/setup 开始 我遵循了 http://docs.sonarqube.org/display/SONAR/Upgrading
上的更新指南如何解决该错误并继续更新?
编辑:
我正在从嵌入式 H2 数据库迁移到 postgress,所以我不介意丢失数据库中的所有数据。我从头开始删除并创建了数据库。 Sonar 已启动,在数据库中创建了表,但无法访问 Web UI。我遇到了同样的错误 - 这次直接显示在浏览器中。
我也删除了大部分 /opt/sonar/extensions/plugins 只留下
sonar-build-breaker-plugin-1.1.jar
sonar-findbugs-plugin-3.2.jar
sonar-java-plugin-3.1.jar
sonar-jira-plugin-1.2.jar
sonar-views-plugin-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.access0(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.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)
问题已通过从 /opt/sonar/extensions/plugins 目录中删除 所有 插件,然后从更新中逐个重新安装它们来解决中心 (http://localhost/updatecenter/available).
Views 插件是罪魁祸首。使用 5.1,您必须安装 Views 2.8。