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

Update JRuby library #3944

Open
thc202 opened this issue Oct 11, 2017 · 1 comment
Open

Update JRuby library #3944

thc202 opened this issue Oct 11, 2017 · 1 comment

Comments

@thc202
Copy link
Member

thc202 commented Oct 11, 2017

From zaproxy/zap-extensions#1021, update JRuby to latest version (this requires more changes than just update the library, per comments in zaproxy/zap-extensions#1021 (review)).

Related to #2602, current version is failing with Java 9:

[ZAP-BootstrapGUI] ERROR org.parosproxy.paros.extension.ExtensionLoader  - 
java.lang.ExceptionInInitializerError
	at org.jruby.embed.internal.AbstractLocalContextProvider.<init>(AbstractLocalContextProvider.java:42)
	at org.jruby.embed.internal.SingletonLocalContextProvider.<init>(SingletonLocalContextProvider.java:88)
	at org.jruby.embed.ScriptingContainer.getProviderInstance(ScriptingContainer.java:246)
	at org.jruby.embed.ScriptingContainer.<init>(ScriptingContainer.java:226)
	at org.jruby.embed.jsr223.JRubyEngineFactory.getScriptEngine(JRubyEngineFactory.java:170)
	at org.zaproxy.zap.extension.jruby.ExtensionJruby.hook(ExtensionJruby.java:79)
	at org.parosproxy.paros.extension.ExtensionLoader.hookAllExtension(Unknown Source)
	at org.parosproxy.paros.extension.ExtensionLoader.startLifeCycle(Unknown Source)
	at org.parosproxy.paros.control.AbstractControl.loadExtension(Unknown Source)
	at org.parosproxy.paros.control.Control.init(Unknown Source)
	at org.parosproxy.paros.control.Control.initSingletonWithView(Unknown Source)
	at org.zaproxy.zap.GuiBootstrap.initControlAndPostViewInit(Unknown Source)
	at org.zaproxy.zap.GuiBootstrap.access$100(Unknown Source)
	at org.zaproxy.zap.GuiBootstrap$2.run(Unknown Source)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.RuntimeException: unsupported Java version: 9
	at org.jruby.RubyInstanceConfig.initGlobalJavaVersion(RubyInstanceConfig.java:1693)
	at org.jruby.RubyInstanceConfig.<clinit>(RubyInstanceConfig.java:1398)
	... 15 more

Newer JRuby version appears to work fine with Java 9 (no errors at start up and script Traverse sites tree.rb runs with no errors).

@alfsb alfsb mentioned this issue Nov 14, 2017
13 tasks
thc202 added a commit to thc202/zaproxy that referenced this issue Jul 18, 2018
Change AddOnInstaller to catch Throwable when installing the extensions
of add-ons to prevent issues in those extensions from breaking the
installation process (e.g. a failure in one would prevent other add-ons
from being installed).

Related to zaproxy#3944 - Update JRuby library
@thc202
Copy link
Member Author

thc202 commented Apr 11, 2023

This is a problem now that ZAP requires Java 11, which means the Ruby script engine can no longer be used.

@thc202 thc202 added bug and removed enhancement labels Apr 11, 2023
@thc202 thc202 mentioned this issue Aug 21, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant