Forum: JRuby load error: openssl -- java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.open

F969db5b556041c7d3ea2570338b5300?d=identicon&s=25 Navaneeth.K.N (Guest)
on 2013-09-30 11:53
(Received via mailing list)
Hello Guys,

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.

Jruby version - 1.7.4
System - Mac OS X 10.8.4


--
Thanks
Navaneeth
D565139dbbafc06e7daf4826ca0f0228?d=identicon&s=25 R. Tyler Croy (Guest)
on 2013-09-30 18:03
(Received via mailing list)
Attachment: signature.asc (197 Bytes)
On Mon, 30 Sep 2013, Navaneeth.K.N wrote:

> 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.

- R. Tyler Croy
F969db5b556041c7d3ea2570338b5300?d=identicon&s=25 Navaneeth.K.N (Guest)
on 2013-09-30 18:37
(Received via mailing list)
On Mon, Sep 30, 2013 at 9:31 PM, R. Tyler Croy <tyler@monkeypox.org>
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.

>
> - R. Tyler Croy
> --------------------------------------
>     Code: https://github.com/rtyler
>  Chatter: https://twitter.com/agentdero
>           rtyler@jabber.org



--
Thanks
Navaneeth
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.