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

JVM version detection breaks on Java 10 #157

Closed
perlun opened this issue Mar 22, 2018 · 14 comments
Closed

JVM version detection breaks on Java 10 #157

perlun opened this issue Mar 22, 2018 · 14 comments

Comments

@perlun
Copy link

perlun commented Mar 22, 2018

Very similar to #142; this has unfortunately regressed on Java 10.

$ gem install bundler
Ignoring executable-hooks-1.4.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.4.2
Ignoring gem-wrappers-1.4.0 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.4.0
Ignoring jruby-launcher-1.1.4-java because its extensions are not built.  Try: gem pristine jruby-launcher --version 1.1.4
Error loading RubyGems plugin "/Users/plundberg/.rvm/gems/jruby-9.1.16.0@global/gems/executable-hooks-1.4.2/lib/rubygems_plugin.rb": no such file to load -- executable-hooks/wrapper (LoadError)
Error loading RubyGems plugin "/Users/plundberg/.rvm/gems/jruby-9.1.16.0@global/gems/gem-wrappers-1.4.0/lib/rubygems_plugin.rb": no such file to load -- gem-wrappers (LoadError)
ERROR:  Loading command: install (LoadError)
	load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

The reason why this has reappeared is because the java.version format has been changed upstream (again.... 😄)

$ java9
$ java -XshowSettings 2>&1 | grep java.version
    java.version = 9.0.4
$ java10
$ java -XshowSettings 2>&1 | grep java.version
    java.version = 10
    java.version.date = 2018-03-20

I.e. the fix in #143 is really needed for us to get working on Java 10, unless the OpenJDK team is willing to change the version to a normal SemVer version string again. (which I personally think makes sense, but I don't have the full picture there to be able to speak dogmatically about the matter.) Anyhow, going back and forth like this does not make a whole lot of sense to me.

@headius
Copy link
Member

headius commented Mar 22, 2018

Sigh.

@perlun
Copy link
Author

perlun commented Mar 23, 2018

@headius

Sigh.

Yeah. Do you know if it's likely that we can get upstream to fix this (again)?

@headius
Copy link
Member

headius commented Mar 27, 2018

I am just going to hardcode it to use V9 for anything that isn't "1.7", "1.8", or "8". Hopefully they'll settle into a pattern before we decide we need Java 10 bytecode features.

@headius
Copy link
Member

headius commented Mar 27, 2018

I've fixed this on all branches of JRuby and it will be in the next releases, whatever they may be.

@perlun
Copy link
Author

perlun commented Mar 28, 2018

Much appreciated @headius, thank you for this. 👏

@headius
Copy link
Member

headius commented Apr 3, 2018

@kares We need to get a release out for 9.1.17. Do you have anything else you want to get in?

@kares
Copy link
Member

kares commented Apr 4, 2018

fix this issue (it pbly needs to be fixed in jossl itself as well) and that the usual regression -> tests failing
... but I wasn't planning looking into any of them atm.

@perlun
Copy link
Author

perlun commented Apr 30, 2018

Java 10.0.1 has been released and they have sorted this out now:

$ java -XshowSettings 2>&1 | grep java.version
    java.version = 10.0.1
    java.version.date = 2018-04-17
$ gem install bundler
Successfully installed bundler-1.16.1
1 gem installed

@kares
Copy link
Member

kares commented May 17, 2018

has been resolved in jruby-openssl (>=) 0.10.0.
only Java (9/10) pre-releases were really problematic, as comments already suggested.

@eiswind
Copy link

eiswind commented Sep 29, 2018

I still see this broken withjava 11 and 9.1.17.0, it seems to be ok with 9.2.0.0 but unfortunately I need 9.1. for asciidoctorj.

@Seegras
Copy link

Seegras commented Nov 20, 2018

Still broken here:

bin/logstash
unsupported Java version "10", defaulting to 1.7

java -XshowSettings 2>&1 | grep java.version
java.version = 10.0.2
java.version.date = 2018-07-17

dpkg -l | grep logstash
logstash 1:6.5.0-1

Would you please at least get rid of the stupid check and just try to take whatever java is offered? because it just might work; whereas defaulting to ancient versions sure does not.

@schwaz80
Copy link

Still broken here:

bin/logstash
unsupported Java version "10", defaulting to 1.7

java -XshowSettings 2>&1 | grep java.version
java.version = 10.0.2
java.version.date = 2018-07-17

dpkg -l | grep logstash
logstash 1:6.5.0-1

Would you please at least get rid of the stupid check and just try to take whatever java is offered? because it just might work; whereas defaulting to ancient versions sure does not.

This still looks broken. I am running a slightly newer version of Logstash and still seeing the same errors.

@sumanawal
Copy link

I am still getting this error in java version 12.

$ gem install bundler
ERROR:  Loading command: install (LoadError)
	load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
$ java -XshowSettings 2>&1 | grep java.version
    java.version = 12
    java.version.date = 2019-03-19

@yumao5
Copy link

yumao5 commented Aug 26, 2019

I am still getting this error in java version 12.

$ gem install bundler
ERROR:  Loading command: install (LoadError)
	load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
$ java -XshowSettings 2>&1 | grep java.version
    java.version = 12
    java.version.date = 2019-03-19

Same here.

robbavey added a commit to elastic/logstash that referenced this issue Mar 23, 2022
The version of jossl bundled in jruby-9.1.12.0 is incompatible with
JDK17, due to jruby/jruby-openssl#157.

This is a temporary pin until we update the versions of jruby in the
build infrastructure
robbavey added a commit to elastic/logstash that referenced this issue Mar 24, 2022
The version of jossl bundled in jruby-9.1.12.0 is incompatible with
JDK17, due to jruby/jruby-openssl#157.

This is a temporary pin until we update the versions of jruby in the
build infrastructure
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

No branches or pull requests

8 participants