I am new at playing with JRuby, as part of my initial testing I have
attempted to package a program I wrote into a jar file. I have been able
to get it to run, but it seems java is resolving a namespace in the
wrong way (this works when running with ruby directly and even when
running with jruby).
The error I get is:
uninitialized constant AWS::S3::Connection::OpenSSL (NameError)
aws/s3/connection.rb:102 looks like this:
1 module AWS
2 module S3
3 class Connection #:nodoc:
99 def create_connection
100 http = http_class.new(options[:server], options[:port])
101 http.use_ssl = !options[:use_ssl].nil? || options[:port] == 443
102 http.verify_mode = OpenSSL::SSL::VERIFY_NONE
So it seems OpenSSL::SSL::VERIFY_NONE is being look up at
AWS:S3::Connection, instead of the top level OpenSSL namespace.
This only happens when I package everything in a jar and run it as:
java -cp test.jar:jopenssl.jar test
test.jar was created by copying jruby-complete.jar and adding my classes
jrubyc * (which includes the aws directory)
jar uf …/test.jar *
Anyone has any clue what I’m doing wrong?
To unsubscribe from this list, please visit: