You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ jruby --version
jruby 9.1.13.0 (2.3.3) 2017-09-06 8e1c115 Java HotSpot(TM) 64-Bit Server VM 9+181 on 9+181 +jit [darwin-x86_64]
$ java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
$ java -XshowSettings 2>&1 | grep java.version
java.version = 9
Expected Behavior
JRuby should be able to install a rubygem
bin/jruby -S gem install bundler --version 1.14.6
Actual Behavior
$ tools/jruby/bin/jruby -S gem install bundler --version 1.14.6 --backtrace --debug
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
NOTE: Debugging mode prints all exceptions even when rescued
java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
at java.lang.String.checkBoundsBeginEnd(java/lang/String.java:3116)
at java.lang.String.substring(java/lang/String.java:1885)
at org.jruby.ext.openssl.OpenSSL.javaVersion6(org/jruby/ext/openssl/OpenSSL.java:263)
at org.jruby.ext.openssl.Random.createHolderImpl(org/jruby/ext/openssl/Random.java:61)
at org.jruby.ext.openssl.Random.createRandom(org/jruby/ext/openssl/Random.java:277)
at org.jruby.ext.openssl.OpenSSL.createOpenSSL(org/jruby/ext/openssl/OpenSSL.java:78)
at org.jruby.ext.openssl.OpenSSL.load(org/jruby/ext/openssl/OpenSSL.java:53)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:564)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:453)
at org.jruby.javasupport.JavaMethod.invokeStaticDirect(org/jruby/javasupport/JavaMethod.java:365)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/jopenssl/load.rb:26)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:962)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther30:gem_original_require(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/openssl.rb:1)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:962)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther30:gem_original_require(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/openssl.rb:1)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:962)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther30:gem_original_require(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/security.rb:1)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:962)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther30:gem_original_require(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/security.rb:12)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:962)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther30:gem_original_require(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/package.rb:1)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:962)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther30:gem_original_require(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59)
at RUBY.(root)(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/package.rb:44)
at RUBY.(root)(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/dependency_installer.rb:1)
at RUBY.(root)(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/dependency_installer.rb:4)
at RUBY.(root)(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:1)
at RUBY.(root)(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:4)
at RUBY.(root)(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:1)
at RUBY.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:207)
at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2877)
at org.jruby.RubyKernel.loadCommon(org/jruby/RubyKernel.java:981)
at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:973)
at org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(org/jruby/RubyKernel$INVOKER$s$0$1$load19.gen)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.bin.gem.invokeOther3:load(Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/bin//Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/bin/gem:4)
at Users.ketanpadegaonkar.projects.gocd.gocd.tools.jruby.bin.gem.<main>(/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/bin/gem:4)
at java.lang.invoke.MethodHandle.invokeWithArguments(java/lang/invoke/MethodHandle.java:638)
at org.jruby.Ruby.runScript(org/jruby/Ruby.java:828)
at org.jruby.Ruby.runNormally(org/jruby/Ruby.java:747)
at org.jruby.Ruby.runNormally(org/jruby/Ruby.java:765)
at org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:578)
at org.jruby.Main.doRunFromMain(org/jruby/Main.java:417)
at org.jruby.Main.internalRun(org/jruby/Main.java:305)
at org.jruby.Main.run(org/jruby/Main.java:232)
at org.jruby.Main.main(org/jruby/Main.java:204)
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
Exception `LoadError' at org/jruby/RubyKernel.java:955 - load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
ERROR: Loading command: install (LoadError)
load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
org/jruby/RubyKernel.java:955:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/openssl.rb:1:in `<main>'
org/jruby/RubyKernel.java:955:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/security.rb:1:in `<main>'
org/jruby/RubyKernel.java:955:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/security.rb:12:in `<main>'
org/jruby/RubyKernel.java:955:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/package.rb:1:in `<main>'
org/jruby/RubyKernel.java:955:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/package.rb:44:in `<main>'
org/jruby/RubyKernel.java:955:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/dependency_installer.rb:1:in `(root)'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/dependency_installer.rb:4:in `(root)'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:1:in `(root)'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:4:in `(root)'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:1:in `(root)'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:207:in `load_and_instantiate'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:127:in `<main>'
org/jruby/RubyKernel.java:973:in `load'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/bin/gem:4:in `<main>'
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:171:in `process_args'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:141:in `run'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/gem_runner.rb:59:in `run'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/bin/jgem:21:in `<main>'
org/jruby/RubyKernel.java:973:in `load'
/Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/bin/gem:4:in `<main>'
Exception `Gem::SystemExitException' at /Users/ketanpadegaonkar/projects/gocd/gocd/tools/jruby/lib/ruby/stdlib/rubygems/user_interaction.rb:394 - Exiting RubyGems with exit_code 1
Analysis
On further analysis, it appears that this bug is a combination of 2 things:
on java 9, the system property java.version is set to 9 as against 1.{6,7,8}.X in earlier versions
Environment
Expected Behavior
bin/jruby -S gem install bundler --version 1.14.6
Actual Behavior
Analysis
On further analysis, it appears that this bug is a combination of 2 things:
java.version
is set to9
as against1.{6,7,8}.X
in earlier versionsjava.version
does not follow themajor.minor
schema anymore.The text was updated successfully, but these errors were encountered: