Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem.install caused a BootstrapMethodError #7120

Closed
jimtng opened this issue Feb 27, 2022 · 20 comments · Fixed by #7271
Closed

Gem.install caused a BootstrapMethodError #7120

jimtng opened this issue Feb 27, 2022 · 20 comments · Fixed by #7271
Milestone

Comments

@jimtng
Copy link
Contributor

jimtng commented Feb 27, 2022

Environment Information

Provide at least:

  • JRuby version 9.3.3.0
  • Operating system and platform: Happens on both Docker Ubuntu and OSX Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64

I'm using JRuby through org.jruby.embed.jsr223.JRubyEngineFactory, inside an osgi bundle

Expected Behavior

Calling Gem.install(any_valid_installable_gem) should install the gem if it isn't already installed, or proceed without error.

private final javax.script.ScriptEngineFactory factory = new org.jruby.embed.jsr223.JRubyEngineFactory();
javax.script.ScriptEngine engine = factory.getScriptEngine();
engine.eval("Gem.install('any valid gem')");

Actual Behavior

Gem.install caused the following error:

Error type 1

java.lang.BootstrapMethodError: bootstrap method initialization exception
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$block$data$1(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:118) ~[?:?]
        at org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:151) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:106) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyIO.ensureYieldClose(RubyIO.java:1154) ~[?:?]
        at org.jruby.RubyIO.open(RubyIO.java:1148) ~[?:?]
        at org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:223) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.invokeOther12:open(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:113) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$method$data$0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:113) ~[?:?]
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:152) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:148) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:142) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.RubySymbol$SymbolProcBody.yieldInner(RubySymbol.java:1439) ~[?:?]
        at org.jruby.RubySymbol$SymbolProcBody.doYield(RubySymbol.java:1454) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyArray.selectCommon(RubyArray.java:2712) ~[?:?]
        at org.jruby.RubyArray.select(RubyArray.java:2721) ~[?:?]
        at org.jruby.RubyArray$INVOKER$i$0$0$select.call(RubyArray$INVOKER$i$0$0$select.gen) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.specification.invokeOther2:select(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:774) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.specification.RUBY$method$gemspec_stubs_in$0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:774) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.specification.RUBY$method$gemspec_stubs_in$0$__VARARGS__(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:773) ~[?:?]
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:142) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:142) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152) ~[?:?]
        at org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:87) ~[?:?]
        at org.jruby.RubyEnumerable.any_pCommon(RubyEnumerable.java:1742) ~[?:?]
        at org.jruby.RubyEnumerable.any_p(RubyEnumerable.java:1710) ~[?:?]
        at org.jruby.RubyEnumerable$INVOKER$s$any_p.call(RubyEnumerable$INVOKER$s$any_p.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneBlock.call(JavaMethod.java:580) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:142) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116) ~[?:?]
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136) ~[?:?]
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66) ~[?:?]
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58) ~[?:?]
        at org.jruby.runtime.Block.call(Block.java:143) ~[?:?]
        at org.jruby.RubyProc.call(RubyProc.java:309) ~[?:?]
        at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105) ~[?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

Error type 2

Under certain situations it sometimes throw this error:

java.lang.BootstrapMethodError: bootstrap method initialization exception
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:194) ~[?:?]
        at java.lang.invoke.CallSite.makeSite(CallSite.java:307) ~[?:?]
        at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:258) ~[?:?]
        at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:248) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$block$data$1(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:118) ~[?:?]
        at org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:151) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:106) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyIO.ensureYieldClose(RubyIO.java:1154) ~[?:?]
        at org.jruby.RubyIO.open(RubyIO.java:1148) ~[?:?]
        at org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:404) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:216) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:223) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.invokeOther12:open(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:113) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$method$data$0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:113) ~[?:?]
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:152) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:148) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87) ~[?:?]
        at org.jruby.RubySymbol$SymbolProcBody.yieldInner(RubySymbol.java:1439) ~[?:?]
        at org.jruby.RubySymbol$SymbolProcBody.doYield(RubySymbol.java:1454) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyArray.selectCommon(RubyArray.java:2687) ~[?:?]
        at org.jruby.RubyArray.select(RubyArray.java:2721) ~[?:?]
        at org.jruby.RubyArray$INVOKER$i$0$0$select.call(RubyArray$INVOKER$i$0$0$select.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116) ~[?:?]
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136) ~[?:?]
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:170) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyEnumerable$19.call(RubyEnumerable.java:854) ~[?:?]
        at org.jruby.runtime.CallBlock.doYield(CallBlock.java:97) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyArray.each(RubyArray.java:1865) ~[?:?]
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152) ~[?:?]
        at org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:87) ~[?:?]
        at org.jruby.RubyEnumerable.flatMapCommon(RubyEnumerable.java:848) ~[?:?]
        at org.jruby.RubyEnumerable.flat_map(RubyEnumerable.java:836) ~[?:?]
        at org.jruby.RubyEnumerable$INVOKER$s$0$0$flat_map.call(RubyEnumerable$INVOKER$s$0$0$flat_map.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:142) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116) ~[?:?]
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136) ~[?:?]
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66) ~[?:?]
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:48) ~[?:?]
        at org.jruby.runtime.Block.call(Block.java:169) ~[?:?]
        at org.jruby.RubyEnumerable$EachWithIndex.call(RubyEnumerable.java:1098) ~[?:?]
        at org.jruby.runtime.BlockCallback.call(BlockCallback.java:54) ~[?:?]
        at org.jruby.runtime.CallBlock.doYield(CallBlock.java:102) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:116) ~[?:?]
        at org.jruby.runtime.Block.yieldValues(Block.java:234) ~[?:?]
        at org.jruby.RubyEnumerator$1.call(RubyEnumerator.java:391) ~[?:?]
        at org.jruby.runtime.BlockCallback.call(BlockCallback.java:58) ~[?:?]
        at org.jruby.runtime.CallBlock.doYield(CallBlock.java:97) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyEnumerable$10.doYield(RubyEnumerable.java:497) ~[?:?]
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108) ~[?:?]
        at org.jruby.runtime.Block.yield(Block.java:188) ~[?:?]
        at org.jruby.RubyArray.each(RubyArray.java:1865) ~[?:?]
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152) ~[?:?]
        at org.jruby.RubyEnumerable.each(RubyEnumerable.java:113) ~[?:?]
        at org.jruby.RubyEnumerable.sort_by(RubyEnumerable.java:487) ~[?:?]
        at org.jruby.RubyEnumerable$INVOKER$s$0$0$sort_by.call(RubyEnumerable$INVOKER$s$0$0$sort_by.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560) ~[?:?]
        at org.jruby.RubyClass.finvokeWithRefinements(RubyClass.java:510) ~[?:?]
        at org.jruby.RubyClass.finvoke(RubyClass.java:498) ~[?:?]
        at org.jruby.runtime.Helpers.invoke(Helpers.java:645) ~[?:?]
        at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:387) ~[?:?]
        at org.jruby.RubyEnumerator.__each__(RubyEnumerator.java:387) ~[?:?]
        at org.jruby.RubyEnumerator.each(RubyEnumerator.java:383) ~[?:?]
        at org.jruby.RubyEnumerator$INVOKER$i$each.call(RubyEnumerator$INVOKER$i$each.gen) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152) ~[?:?]
        at org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:95) ~[?:?]
        at org.jruby.RubyEnumerator.with_index_common(RubyEnumerator.java:562) ~[?:?]
        at org.jruby.RubyEnumerator.with_index(RubyEnumerator.java:572) ~[?:?]
        at org.jruby.RubyEnumerator$INVOKER$i$with_index.call(RubyEnumerator$INVOKER$i$with_index.gen) ~[?:?]
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneBlock.call(JavaMethod.java:580) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116) ~[?:?]
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136) ~[?:?]
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:76) ~[?:?]
        at org.jruby.runtime.Block.yieldSpecific(Block.java:157) ~[?:?]
        at org.jruby.ir.targets.indy.YieldSite.yieldSpecific(YieldSite.java:161) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.resolver.molinillo.lib.molinillo.delegates.specification_provider.RUBY$method$with_no_such_dependency_error_handling$0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:77) ~[?:?]
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.resolver.molinillo.lib.molinillo.delegates.specification_provider.RUBY$method$with_no_such_dependency_error_handling$0$__VARARGS__(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:76) ~[?:?]
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87) ~[?:?]
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201) ~[?:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188) ~[?:?]
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372) ~[?:?]
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175) ~[?:?]
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316) ~[?:?]
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81) ~[?:?]
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30) ~[?:?]
        at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42) ~[?:?]
        at org.jruby.Ruby.runInterpreter(Ruby.java:1292) ~[?:?]
        at org.jruby.Ruby.runInterpreter(Ruby.java:1296) ~[?:?]
        at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:119) ~[?:?]
        at org.jruby.embed.jsr223.JRubyEngine.doEval(JRubyEngine.java:97) ~[?:?]
        at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:124) ~[?:?]
        at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:150) ~[?:?]
        at org.openhab.core.automation.module.script.internal.ScriptEngineManagerImpl.loadScript(ScriptEngineManagerImpl.java:177) ~[?:?]
        at org.openhab.core.automation.module.script.rulesupport.loader.ScriptFileWatcher.createAndLoad(ScriptFileWatcher.java:231) ~[?:?]
        at org.openhab.core.automation.module.script.rulesupport.loader.ScriptFileWatcher.importFile(ScriptFileWatcher.java:211) ~[?:?]
        at org.openhab.core.automation.module.script.rulesupport.loader.ScriptFileWatcher.lambda$2(ScriptFileWatcher.java:203) ~[?:?]
        at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
        at org.openhab.core.automation.module.script.rulesupport.loader.ScriptFileWatcher.importFileWhenReady(ScriptFileWatcher.java:201) ~[?:?]
        at org.openhab.core.automation.module.script.rulesupport.loader.ScriptFileWatcher.processWatchEvent(ScriptFileWatcher.java:178) ~[?:?]
        at org.openhab.core.service.WatchQueueReader.lambda$3(WatchQueueReader.java:323) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: no such method: org.jruby.runtime.Helpers.constructRubyStringArray(RubyString,RubyString,RubyString)RubyString[]/invokeStatic
        at org.jruby.runtime.Helpers.constructRubyStringArrayHandle(Helpers.java:1510) ~[?:?]
        at org.jruby.ir.targets.indy.DRegexpObjectSite.prepareBinder(DRegexpObjectSite.java:64) ~[?:?]
        at org.jruby.ir.targets.indy.ConstructObjectSite.bootstrap(ConstructObjectSite.java:22) ~[?:?]
        at org.jruby.ir.targets.indy.DRegexpObjectSite.bootstrap(DRegexpObjectSite.java:43) ~[?:?]
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:215) ~[?:?]
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:102) ~[?:?]
        ... 308 more
Caused by: java.lang.IllegalAccessException: no such method: org.jruby.runtime.Helpers.constructRubyStringArray(RubyString,RubyString,RubyString)RubyString[]/invokeStatic
        at java.lang.invoke.MemberName.makeAccessException(MemberName.java:959) ~[?:?]
        at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1101) ~[?:?]
        at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:2030) ~[?:?]
        at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:1102) ~[?:?]
        at org.jruby.runtime.Helpers.constructRubyStringArrayHandle(Helpers.java:1505) ~[?:?]
        at org.jruby.ir.targets.indy.DRegexpObjectSite.prepareBinder(DRegexpObjectSite.java:64) ~[?:?]
        at org.jruby.ir.targets.indy.ConstructObjectSite.bootstrap(ConstructObjectSite.java:22) ~[?:?]
        at org.jruby.ir.targets.indy.DRegexpObjectSite.bootstrap(DRegexpObjectSite.java:43) ~[?:?]
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:215) ~[?:?]
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:102) ~[?:?]
        ... 308 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'org.jruby.RubyString[] org.jruby.runtime.Helpers.constructRubyStringArray(org.jruby.RubyString, org.jruby.RubyString, org.jruby.RubyString)' the class loader 'bootstrap' of the current class, java/lang/Object, and the class loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2fef16e1 for the method's defining class, org/jruby/runtime/Helpers, have different Class objects for the type org/jruby/RubyString used in the signature (java.lang.Object is in module java.base of loader 'bootstrap'; org.jruby.runtime.Helpers is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2fef16e1, parent loader java.net.URLClassLoader @9a7504c)
        at java.lang.invoke.MethodHandleNatives.resolve(Native Method) ~[?:?]
        at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:1070) ~[?:?]
        at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1098) ~[?:?]
        at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:2030) ~[?:?]
        at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:1102) ~[?:?]
        at org.jruby.runtime.Helpers.constructRubyStringArrayHandle(Helpers.java:1505) ~[?:?]
        at org.jruby.ir.targets.indy.DRegexpObjectSite.prepareBinder(DRegexpObjectSite.java:64) ~[?:?]
        at org.jruby.ir.targets.indy.ConstructObjectSite.bootstrap(ConstructObjectSite.java:22) ~[?:?]
        at org.jruby.ir.targets.indy.DRegexpObjectSite.bootstrap(DRegexpObjectSite.java:43) ~[?:?]
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:215) ~[?:?]
        at java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:102) ~[?:?]
        ... 308 more

@headius
Copy link
Member

headius commented Mar 17, 2022

Sorry to not jump on this one right away.

Looking at the trace, this seems like it relates to OSGI. The final error at the bottom (thanks for including both sets of traces!) mentions a classloader mismatch that prevents a method from linking properly.

Unfortunately I know almost nothing about OSGI. It might be easiest if you pushed a small repository that reproduced this issue, so I can just build and run it and get the same result.

@domagojcc
Copy link

I have a similar (or same) error outside OSGi, in a Maven build using asciidoctor-maven-plugin. Unfortunately, I currently cannot provide more information as I am still investigating it. But just as a hint, the conculusion that the issue is OSGi related might prove wrong...

@jimtng
Copy link
Contributor Author

jimtng commented May 9, 2022

My apologies for not having been able to provide the steps to reproduce this issue. It is encountered in a rather convoluted setup and I haven't been able to create a simple/small simulated environment to trigger the same error.

@domagojcc
Copy link

I can now however provide some other clues. The behaviour is not the same with different Java implementations. I have the issue when using JDK or OpenJDK 8, 11, 12, and 13. With JDK or OpenJDK 14, 15, 16, 17, 18, or 19EA the issue does not occur. It also does not occur with IBM J9 Java 11. (All runs done with most recent release of each version.) @jimtng can you reproduce my findings regarnding Java-Versions?

@domagojcc
Copy link

Still another finding, in case it might help. The issue did not exist with JRuby version 9.2.20.1 and came into existence with 9.3.0.0, irregardles of the JDK version used.

@jimtng
Copy link
Contributor Author

jimtng commented May 15, 2022

@domagojcc For some reasons I couldn't build against jruby 9.2.x any more. However I did try using Zulu jre 17 and the problem does not occur like you said. Thanks for this discovery!

Previously I was using java 11 where the problem occurred.

I'm happy to consider this as the solution since I believe we're going to move to java 17 soon.

@headius / @domagojcc should I keep this issue open?

@rsim
Copy link

rsim commented Jun 27, 2022

We sometimes get a similar issue with JRuby 9.3.3.0 and 9.3.4.0 when we load our application as a Jira plugin which runs as an OSGi plugin. We do not get it after a fresh start but after uninstalling and reinstalling the plugin:

2022-06-27 18:26:23,782+0300 http-nio-19000-exec-5 ERROR      [o.a.c.c.C.[.[localhost].[/].[servlet-module-container-servlet]] Servlet.service() for servlet [servlet-module-container-servlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.BootstrapMethodError: bootstrap method initialization exception
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$block$data$1(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:118)
        at org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:151)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:106)
        at org.jruby.runtime.Block.yield(Block.java:188)
        at org.jruby.RubyIO.ensureYieldClose(RubyIO.java:1154)
        at org.jruby.RubyIO.open(RubyIO.java:1148)
        at org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:214)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:223)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.invokeOther12:open(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:113)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$method$data$0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:113)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:152)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:148)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.invokeOther0:data(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:203)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$method$valid?$0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:203)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.stub_specification.RUBY$method$valid?$0$__VARARGS__(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:202)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
        at org.jruby.RubySymbol$SymbolProcBody.yieldInner(RubySymbol.java:1439)
        at org.jruby.RubySymbol$SymbolProcBody.doYield(RubySymbol.java:1454)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
        at org.jruby.runtime.Block.yield(Block.java:188)
        at org.jruby.RubyArray.selectCommon(RubyArray.java:2737)
        at org.jruby.RubyArray.select(RubyArray.java:2746)
        at org.jruby.RubyArray$INVOKER$i$0$0$select.call(RubyArray$INVOKER$i$0$0$select.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:170)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
        at org.jruby.runtime.Block.yield(Block.java:188)
        at org.jruby.RubyEnumerable$19.call(RubyEnumerable.java:854)
        at org.jruby.runtime.CallBlock.doYield(CallBlock.java:97)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
        at org.jruby.runtime.Block.yield(Block.java:188)
        at org.jruby.RubyArray.each(RubyArray.java:1865)
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152)
        at org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:87)
        at org.jruby.RubyEnumerable.flatMapCommon(RubyEnumerable.java:848)
        at org.jruby.RubyEnumerable.flat_map(RubyEnumerable.java:836)
        at org.jruby.RubyEnumerable$INVOKER$s$0$0$flat_map.call(RubyEnumerable$INVOKER$s$0$0$flat_map.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
...

As I see the failing line at META-INF/jruby.home/lib/ruby/stdlib/rubygems/stub_specification.rb:118 is

extensions = if /\A#{PREFIX}/ =~ file.readline.chomp
               $'.split "\0"
             else
               StubLine::NO_EXTENSIONS
             end

Any ideas on which method call here could cause this BootstrapMethodError? Any hints how to debug it further or what workaround to apply?

@jimtng
Copy link
Contributor Author

jimtng commented Jun 28, 2022

@rsim did you get Caused by: java.lang.LinkageError: loader constraint violation: when resolving method in your stack trace?

@rsim
Copy link

rsim commented Jun 28, 2022

@jimtng Sometimes I see a similar error:

Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'org.jruby.RubyString[] org.jruby.runtime.Helpers.constructRubyStringArray(org.jruby.RubyString, org.jruby.RubyString, org.jruby.RubyString, org.jruby.RubyString)' the class loader 'bootstrap' of the current class, java/lang/Object, and the class loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @58634468 for the method's defining class, org/jruby/runtime/Helpers, have different Class objects for the type org/jruby/RubyString used in the signature (java.lang.Object is in module java.base of loader 'bootstrap'; org.jruby.runtime.Helpers is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @58634468, parent loader org.apache.catalina.loader.ParallelWebappClassLoader @7957dc72)

It seems that one of the causes is that after I uninstall this OSGi plugin there are still many JRuby objects remaining in the memory and I have not yet debugged what keeps the references to them. And then during the next installation of the plugin somehow the old existing JRuby java classes are found which causes this error about different class loader.

@rsim
Copy link

rsim commented Jun 28, 2022

I'm looking in JRuby source core/src/main/java/org/jruby/runtime/Helpers.java

handle = MethodHandles.publicLookup().findStatic(Helpers.class, "constructRubyStringArray", MethodType.methodType(RubyString[].class, CodegenUtils.params(RubyString.class, size)));

and I suspect that when there are several OSGi plugins with several org.jruby.runtime.Helpers classes loaded then this might find a class from the other OSGi plugin and then this error happens.

@headius I found out that the usage of MethodHandles.publicLookup().findStatic was introduced in this commit fa48c66 as a solution for #6628. As I see it was introduced in JRuby 9.3 and was not in 9.2. This might explain why we (and others) started to see this error in JRuby 9.3 and didn't see it in JRuby 9.2.

@rsim
Copy link

rsim commented Jun 28, 2022

Found a similar problem mentioned on Twitter https://twitter.com/felix_b/status/1321088287285645312

@rsim
Copy link

rsim commented Jun 28, 2022

I managed to create a workaround for this problem by patching org.jruby.runtime.Helpers method constructRubyStringArrayHandle and changed

if (size > 10)

to

if (size > 0)

which as a result avoids the usage of MethodHandles.publicLookup().findStatic. As I understand this will slow down creation of small arrays of strings but as I understand it will not be worse compared to JRuby 9.2 and at least it now works after repeated installations / uninstallations of OSGi plugins with JRuby runtimes inside them.

But still it would be better to make a correct solution which would find the correct methods from the Helpers class that is loaded with the current classloader.

@headius
Copy link
Member

headius commented Jul 6, 2022

Ok thank you for the exploration and new evidence. I wish I could reproduce this.

So far it still seems like it is not exactly our bug. There's no reason I can think of that the call to findStatic from and to the same class would ever produce an error or see across classloaders. I expect it is either a JDK or an OSGi bug.

However...we still need to make it work.

One half-measure would be to detect that we are on a JDK that does this collect operation fast and skip the custom collect logic. That would work for newer JDKs to avoid this issue, and perhaps for older JDKs once patched. It requires us to test all major versions and see if the performance issue is still present.

An alternative option that might help would be to acquire and cache these handles at boot time, so they are only acquired once (presumably all within one classloader) and future collects do not try to reacquire (possibly across classloaders boundaries).

A third option would be to convert these collector methods into lambdas and bind those to the method handle chain rather than direct handles to the collector methods themselves. This would ensure we are only binding to live objects provided by the JDK's lambda bootstrapping. Any further issues at that point would implicate the JDK.

I can try to come up with a patch for this tomorrow while I am in transit, but if someone can experiment with these ideas it would save some time.

@jimtng
Copy link
Contributor Author

jimtng commented Jul 6, 2022

@rsim, are you able to create a reproducible example?

@rsim
Copy link

rsim commented Jul 7, 2022

@headius Thanks for taking a look at this during your vacation :)

I did further experiments and replaced in constructRubyStringArrayHandle and constructObjectArrayHandle

handle = MethodHandles.publicLookup().findStatic(...)

with

handle = MethodHandles.lookup().findStatic(...)

and this solved the problem as well. After repeated installations / uninstallations of OSGi plugins with JRuby runtimes inside them, there were no errors with calling found methods with findClass.

As I see lookup() is described as

Returns a lookup object with full capabilities to emulate all supported bytecode behaviors of the caller.

and publicLookup() as

Returns a lookup object which is trusted minimally.

So probably lookup() will ensure that only the classes that can be accessed via the caller's class loader can be accessed.

As I see currently in other places sometimes MethodHandles.lookup() is used and sometimes MethodHandles.publicLookup(). Do you think it would be OK to change here to lookup()?

In our case, we need this to work on both JDK 8 and 11 (and in the future on 17). So it would be good to use a generic solution that works correctly on all JDKs.

@jimtng
Copy link
Contributor Author

jimtng commented Jul 11, 2022

replaced in constructRubyStringArrayHandle and constructObjectArrayHandle

handle = MethodHandles.publicLookup().findStatic(...)

with

handle = MethodHandles.lookup().findStatic(...)

and this solved the problem

@headius, I tried the changes suggested by @rsim as quoted above and I can confirm also that the problem is solved by these changes.

If this is an accepted solution, @rsim would you be able to create a PR? I'll make one if you're all busy.

@headius
Copy link
Member

headius commented Aug 4, 2022

I did not see this issue reported to OpenJDK so I opened an issue here: https://bugs.openjdk.org/browse/JDK-8291922

We will go forward with the fix proposed by @rsim and PRed by @jimtng in #7271, since it is low-impact.

@headius headius linked a pull request Aug 4, 2022 that will close this issue
@headius headius closed this as completed Aug 4, 2022
@headius
Copy link
Member

headius commented Aug 5, 2022

Does anyone have a simple way to reproduce this? Apparently there were many changes in this area for JDK 14 and the OpenJDK folks responsible are looking for a good reproduction so they can track down what the actual fix was.

@headius
Copy link
Member

headius commented Aug 5, 2022

Ping @rsim @jimtng @domagojcc for help coming up with a reproduction.

@rsim
Copy link

rsim commented Aug 5, 2022

We experienced this problem when using Felix-based OSGi implementation in Atlassian Jira plugins. It will take us some while to create a smaller reproducible example for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants