I am trying to embed JRuby in a Java project. I am using
“jruby-complete-1.7.4.jar” and ScriptingContainer. For some reason,
the following script throws error.
ScriptingContainer container = new ScriptingContainer();
container.runScriptlet(“require ‘net/https’”);
This fails with the exception - load error: openssl –
java.lang.NoClassDefFoundError: Could not initialize class
org.jruby.ext.openssl.ASN1.
This happens only in few computers. We don’t have jruby-openssl and
bouncy castle gem installed. My class path contains only
“jruby-complete-1.7.4.jar”. I am wondering why this error happens and
what should be done to work around this problem? How can this work on
a computer and fails on a different one? Any help to debug the issue
would be great.
On Mon, Sep 30, 2013 at 9:31 PM, R. Tyler C. [email protected]
wrote:
container.runScriptlet(“require ‘net/https’”);
This fails with the exception - load error: openssl –
java.lang.NoClassDefFoundError: Could not initialize class
org.jruby.ext.openssl.ASN1.
Perhaps you need the Java Cryptography Extensions as well (JCE)? They’re
distributed separately from the JRE itself.
Thanks for the help. I am not sure about this because I see ASN1 in
the Jruby source tree under ext directory. But looks like that is not
part of the jruby-complete.jar.