Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

jopenssl/version not loading #52

Closed
cmw opened this Issue · 5 comments

2 participants

@cmw

When loading my rails app from a compiled war, this error occurs (several times) during loading the app:

INFO: An exception happened during JRuby-Rack startup
load error: jopenssl -- java.lang.RuntimeException: (LoadError) no such file to load -- jopenssl/version

In a rails console (java -cp org.jruby.Main -S rails console production) on the server the file loads correctly.

The full error output can be found here: https://gist.github.com/1157043

Any hints greatly appreciated.
Chris

@nicksieger
Owner

Can you set the system property -Djruby.debug.loadService=true in your container/JVM and regenerate the error? I'd be interested to see why it isn't loading. Is Tomcat fully unpacking the war file when it's deployed?

Note: also filed at jruby/jruby-ossl#10

@cmw

The war file is unpacked fully, judging from file counts. I also randomly checked for files and nothing seems missing.

I put that setting in and found this line:

LoadService: trying resourceFromLoadPath: '/var/lib/tomcat6/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib/jopenssl/version.rb' false false

and verified that that file is in place:

-rw-r--r-- 1 tomcat6 tomcat6 65 2011-08-22 18:30 /var/lib/tomcat6/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib/jopenssl/version.rb

All sorts of other files are found successfully.

Do you have any further idea from this?

PS: I'd have posted the whole log output about loadService, but it's like 60 MB now. I have grep'd for 'jopenssl/version' and that still is 1.2 MB, but I could send you that by mail if you liked.

I've found that gems are not compiled. Could that be a problem? (Since that loader looked for jopenssl/version.class, too)

@nicksieger
Owner

Not compiled shouldn't be a problem. I'm curious why it couldn't find the the file, that's very odd and worries me. The actual code is here, so for an unknown reason the Java filesystem checks are failing.

@nicksieger
Owner

Working with @cmw on this, we found that the Tomcat security manager was getting in the way. Closing.

@nicksieger nicksieger closed this
@nicksieger
Owner

For those people wondering how the issue was resolved, the main thing is to follow the instructions in this post. It's written for TC 5.5 but it should apply to newer versions as well.

http://www.hiden.org/sysadmin/tomcat-5-5-and-ubuntu/

If you're skittish about turning off the security manager, then you might try dropping this in the policy.d directory for tomcat (don't recall where it is on the filesystem).

https://gist.github.com/de15ab3adf27a2698fb5#file_10jruby.policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.