当我尝试显示 SonarQube 5.6 服务器的系统信息时,页面上的日志中出现异常。知道是什么原因造成的吗?
这个问题(Get an error as "Could not initialize class sun.net.www.protocol.http.HttpURLConnection" in ZK Framework)暗示 jdk 中缺少 jar。那可能吗?我正在使用 java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64。HttpUrlConnection 实现是否已更改?
2018.04.23 12:12:15 ERROR web[rails]
Java::JavaLang::NoClassDefFoundError (Could not initialize class sun.net.www.protocol.http.HttpURLConnection):
sun.net.www.protocol.http.Handler.openConnection(Handler.java:62)
sun.net.www.protocol.http.Handler.openConnection(Handler.java:57)
java.net.URL.openConnection(URL.java:979)
org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:633)
org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:617)
org.sonar.server.platform.monitoring.ProcessSystemInfoClient.connect(ProcessSystemInfoClient.java:53)
org.sonar.server.platform.ws.InfoAction.writeJson(InfoAction.java:81)
org.sonar.server.platform.ws.InfoAction.handle(InfoAction.java:66)
org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:107)
sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:425)
org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:292)
org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:44)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:70)
rubyjit.Api::JavaWsController$$index_E9F115BCB78D2E226E3015CDA52C1912485D30D01792011778.__file__(app/controllers/api/java_ws_controller.rb:34)
rubyjit.Api::JavaWsController$$index_E9F115BCB78D2E226E3015CDA52C1912485D30D01792011778.__file__(app/controllers/api/java_ws_controller.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:161)
org.jruby.RubyClass.finvoke(RubyClass.java:527)
org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
org.jruby.RubyKernel.send(RubyKernel.java:2223)
org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
rubyjit.ActionController::Base$$perform_action_DA0FC0A901DD1257EC969DB0C482DD8514B8F04B1792011778.__file__(gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1333)
rubyjit.ActionController::Base$$perform_action_DA0FC0A901DD1257EC969DB0C482DD8514B8F04B1792011778.__file__(gems/gems/actionpack-2.3.15/lib/action_controller/base.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:141)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:185)
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
rubyjit.ActionController::Filters::InstanceMethods$$call_filters_A7E1D3FFBF56E3CB7C0EBA850688505249A05AE91792011778.__file__(gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:617)
rubyjit.ActionController::Filters::InstanceMethods$$call_filters_A7E1D3FFBF56E3CB7C0EBA850688505249A05AE91792011778.__file__(gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:261)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
rubyjit.ActionController::Filters::InstanceMethods$$perform_action_with_filters_4C7C67B4A5564FF5DC76344AF2372660F608839C1792011778.__file__(gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:610)
rubyjit.ActionController::Filters::InstanceMethods$$perform_action_with_filters_4C7C67B4A5564FF5DC76344AF2372660F608839C1792011778.__file__(gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:141)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:185)
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
rubyjit.ActionController::Benchmarking$$perform_action_with_benchmark_303676EADF39D1B66CBA6FF2131B0D6C74E043451792011778.block_0$RUBY$__file__(gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68)
rubyjit$ActionController::Benchmarking$$perform_action_with_benchmark_303676EADF39D1B66CBA6FF2131B0D6C74E043451792011778$block_0$RUBY$__file__.call(rubyjit$ActionController::Benchmarking$$perform_action_with_benchmark_303676EADF39D1B66CBA6FF2131B0D6C74E043451792011778$block_0$RUBY$__file__)
org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:112)
org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:95)
org.jruby.runtime.CompiledBlock.yieldSpecific(CompiledBlock.java:75)
org.jruby.runtime.Block.yieldSpecific(Block.java:111)