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

LoadError: load error: jopenssl/load -- java.lang.SecurityException #5068

Closed
talbisaad opened this issue Feb 28, 2018 · 1 comment
Closed

Comments

@talbisaad
Copy link

talbisaad commented Feb 28, 2018

Environment

  • JRuby version : jruby-9.1.16.0
  • Operating system : windows
    Java Framework : GWT
    Ruby : Watir, Rails

Hello,
I'm trying to call Ruby from my java web application using Jruby, for that, i use ScriptingContainer :

`
ScriptingContainer container = new ScriptingContainer();

              List<String> loadPaths = new ArrayList<String>();
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/watir-6.8.4/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/selenium-webdriver-3.9.0/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/childprocess-0.8.0/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/xml-simple-1.1.5/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/rubyzip-1.2.1/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/activesupport-5.1.5/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/concurrent-ruby-1.0.5-java/lib");
              loadPaths.add("C:/jruby-9.1.16.0/lib/ruby/gems/shared/gems/i18n-0.9.5/lib");

              container.setLoadPaths(loadPaths);
              container.put("@url", "www.google.com");
              container.put("@browserConnect", "chrome");
              container.put("@groupingCodesReBillingAggregCodeId", "33");

              container.runScriptlet(scriptFile);

`
i'm getting the following error :

[ERROR] LoadError: load error: jopenssl/load -- java.lang.SecurityException: class "org.bouncycastle.crypto.params.ECNamedDomainParameters"'s signer information does not match signer information of other classes in the same package [ERROR] require at org/jruby/RubyKernel.java:955 [ERROR] require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59 [ERROR] <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/openssl.rb:1 [ERROR] require at org/jruby/RubyKernel.java:955 [ERROR] require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59 [ERROR] <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/https.rb:1 [ERROR] require at org/jruby/RubyKernel.java:955 [ERROR] require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59 [ERROR] <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/https.rb:23 [ERROR] require at org/jruby/RubyKernel.java:955 [ERROR] require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59 [ERROR] <main> at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/http/default.rb:1 [ERROR] (root) at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/http/default.rb:18 [ERROR] (root) at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote.rb:1 [ERROR] (root) at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote.rb:25 [ERROR] (root) at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/watir-6.8.4/lib/watir/capabilities.rb:1 [ERROR] create_http_client at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/watir-6.8.4/lib/watir/capabilities.rb:56 [ERROR] <main> at C:/jruby-9.1.14.0/lib/ruby/gems/shared/gems/watir-6.8.4/lib/watir/capabilities.rb:31
If you need any more information, please let me know.

@kares
Copy link
Member

kares commented Mar 1, 2018

seems like you might have BC on your class-path more than once.
maybe check your WEB-INF/lib for bc .jars there might be several versions of the same.
jruby will always attempt to use its packaged version unless you tell it not to (if you are forced to use a different version from the same class-loader than try -Djruby.openssl.load.jars=false as JAVA_OPTS)

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

No branches or pull requests

2 participants