我試圖通過使用curl在Web API上全新安裝SonarQube v.5.6.4來恢復質量配置文件。SonarQube 5.6還原質量配置文件
在c:\ temp我有一個導出的「聲納方式」配置文件從運行聲納,我已經改名爲test.xml(裏面,名稱也改變了測試,使兩個配置文件「不同」)。
從C:\臨時位置,我用下面的捲曲命令:
curl -v -X POST -u admin:admin --header "Content-Type: application/xml" "http://localhost:9000/api/qualityprofiles/restore" -d backup=test.xml
的反應是:
500 Internal Server Error If you are the administrator of this website, then please read this web application's log file to find out what went wrong.
不管怎麼改變了捲曲命令(具有不同的內容-types,-F參數,@之前的文件名),我無法解決這個問題。
此外,我檢查了這看起來像這樣聲納日誌:
2017.01.30 14:13:14 ERROR web[rails] /!\ FAILSAFE /!\ Mon Jan 30 14:13:14 +0100 2017 Status: 500 Internal Server Error undefined method `name' for nil:NilClass C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/xml_mini/rexml.rb:29:in `merge_element!' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/xml_mini/rexml.rb:18:in `parse' org/jruby/RubyKernel.java:2227:in `send' C:1:in `parse' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/core_ext/hash/conversions.rb:171:in `from_xml' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:34:in `parse_formatted_parameters' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:11:in `call' file:/C:/bin/sonarqube-5.6.4/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/session_store.rb:70:in `context' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/session/abstract/id.rb:58:in `call' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/failsafe.rb:26:in `call' C:/bin/sonarqube-5.6.4/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:106:in `call' file:/C:/bin/sonarqube-5.6.4/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:34:in `serve_rails' file:/C:/bin/sonarqube-5.6.4/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:39:in `call' file:/C:/bin/sonarqube-5.6.4/lib/server/jruby-rack-1.1.13.2.jar!/rack/handler/servlet.rb:22:in `call'
是不是有什麼毛病5.6.4版本?
在此先感謝您的任何反饋意見。