Forum: JRuby Openssl - complete jar bundle question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Manuel Ramos Caro (Guest)
on 2013-06-05 00:14
(Received via mailing list)

I have used the jrubyc for creating classes that are doing use of the
Openssl support.
While i'm running the script onto the Jruby thought prompt all works but
when i do it with the complete jar
fails requesting lost Java classes...

It's a bundle error or its about another reason... Class-path or
other... ?

09a41a085f93af8644a7e2e35ba987af?d=identicon&s=25 Charles N. (headius)
on 2013-06-07 01:29
(Received via mailing list)
Can you provide a simple reproduction? Perhaps jruby-complete.jar is
not containing the libraries it needs for openssl to work.

- Charlie

On Tue, Jun 4, 2013 at 5:12 PM, Manuel Ramos Caro
Manuel Ramos Caro (Guest)
on 2013-06-08 01:52
(Received via mailing list)

I have reproduced the error with a simple example ...

*Executing this code... (script name "test_error.rb")
require 'rubygems'
require 'openssl'

$key = "A75435F0B240012A9489000C2952E41F"

class String

   def encrypt(key=$key)
     e = 'DES-EDE3-CBC'
     e.encrypt key
     s = e.update self
     s <<
     s = s.unpack('H*')[0].upcase
     return s
   end #def encrypt(key=$key)

end #class String

puts "ENCRIPTED STRING:" + "ENCRIPT THIS".encrypt("encrip_key")

*First Test - Successfull Case - Running over  Jruby local install.

*C:\Users\propietario\Desktop\error_openssl>jruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Client VM
1.7.0_21-b11 [Windows 7-x86]

C:\Users\propietario\Desktop\error_openssl>jruby test_error.rb

*Second Test - Error Case - Running over Jruby Complete Jar.
C:\Users\propietario\Desktop\error_openssl>java -jar
jruby-complete-1.7.4.jar -version
jruby (1.9.3p392) 2013-06-01 3708d7d on Java HotSpot(TM)
Client VM 1.7.0_21-b11 [Windows 7-x86]

C:\Users\propietario\Desktop\error_openssl>java -jar
jruby-complete-1.7.4.jar test_error.rb
LoadError: load error: openssl -- java.lang.NoClassDefFoundError:
   require at org/jruby/
   require at
    (root) at test_error.rb:2

Using jars that are here "C:\jruby-1.7.4\lib\ruby\shared" I find changes
over lost class name but i'm lost at one's like ...  "----"

I have solved the problem using zlib instead because only need content
cryption on a file but i think that this can be an issued to open or
maybe by other side can be an error on me execution method.

What do you think about it?


El 07/06/2013 1:25, Charles Oliver Nutter escribió:
This topic is locked and can not be replied to.