Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby needs some helper method to load java libraries depending on jars being on context classloader #3293

Open
mkristian opened this issue Aug 27, 2015 · 1 comment

Comments

@mkristian
Copy link
Member

jruby gems might not work when using in servlet see https://github.com/lookout/fast-rsa-engine

tests all pass, works fine with org.jruby.Mains and jruby-mains main methods but fails on J2EE or OSGi containers. note this is true for standard warbler setup.

the workaround is needed for J2EE and OSGi environments: https://github.com/lookout/fast-rsa-engine/issues/19#issuecomment-135460195

this is related to
#3090

@mkristian mkristian changed the title jruby gems might not work when using in servlet JRuby needs some helper method to load java libraries depending on jars being on context classloader Aug 29, 2015
@mkristian
Copy link
Member Author

first I would like to test all my java gems in way that I am sure they work on servlets, J2EE or OSGi containers as well.

here at switch which I can activate with .jrubyrc would be nice to let the context classloader as is when using the normal command line "jruby"

second it would be nice to have something like

JRuby.load_with_jruby_classloader do
   com.squareup.jnagmp.LibGmp
end

to load classes which depends on context classloader to be the jruby_class_loader from the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants