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
[bug] java.lang.UnsupportedClassVersionError: org/cyberneko/dtd/DTDConfiguration #2887
Comments
@malcolm-pro Sorry you're having problems! I will admit to a very low level of knowledge around Java version support in JRuby and in the vendored Java libraries. That said, the vendored cc @headius in case you're able to point me in the right direction. |
OK, so I rebuilt nekodtd with Java 8 (using the
which again are under the Nokogiri maintainers' control, but I'm not excited about doing this work since I'm not a JRuby user and don't honestly know if this is actually a problem for anyone (you're the first person to ask about Java 8 support). @headius WDYT about restoring support for Java 8? Is it worth the additional maintenance burden? |
@flavorjones We are planning to drop 8 for JRuby 9.5+ but that is several months away and we'd still support 9.4 at least through next year. It's probably worth it. I can help if you can give me a workflow that will result in the errors above. |
@headius Thanks for the context and the offer. I have a CI pipeline that I'm trying to get working at #2889. The above error may be a red herring -- it happens if I compile Nokogiri with Java 8 ... however I think I can still compile with Java 11 and it will run on Java 8. The CI pipeline will tell me if I'm wrong, and in that case I'll need your help. |
@flavorjones I'd also be happy to work on this if you can give me the build/test steps that you're using; I've been de-facto managing the JVM ecosystem (JRuby/Java/Scala) at our company for several years now and have a little cross-compatibility experience. |
New org.nokogiri:nekodtd version cut, v0.1.11.noko2, Information at sparklemotion/nekodtd#2 |
which is built with Java 8 to address #2887
which is built with Java 8 to address #2887
which is built with Java 8 to address #2887
https://github.com/sparklemotion/nokogiri/releases/tag/v1.14.5 has been released with this fixed. v1.15.2 will ship shortly. |
Great news, thanks @flavorjones! |
@headius You're welcome! It was an easier fix than I'd anticipated 🎉 |
@flavorjones This was a mini-masterclass in efficient & well-covered project management. Thank you! |
We've been seeing this error under Java 8 starting with v1.14:
That's a pretty common error when trying to run libraries compiled for Java 11 under Java 8. It looks like this is due to the newer nekodtd jar. I might have missed something, but I don't see any minimum Java version requirements listed, so I've been assuming Nokogiri is still compatible with Java 8. If this is the case, maybe this jar needs to be recompiled under Java 8? If this is not the case, and Nokogiri 1.14+ needs Java 11:
force_ruby_platform: true
in the Gemfile/gemspec avoid loading this JAR?FWIW, JRuby did mention in the 9.3.0.0 release notes that they're considering dropping Java 8 support, and Java 8 is quite long in the tooth, but afaik Java 8 is still supported (and as of last year was still quite widely used).
The text was updated successfully, but these errors were encountered: