Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
JRuby 1.7.2 with authlogic 3.x fails to boot (OpenSSL) #541
When upgrading from JRuby 1.6.8 to 1.7.2 my application fails to boot within Tomcat 6 on Windows. Looks like this is somehow related to the bundled jruby-openssl in JRuby 1.7.*
The resulting line 1 in
Tomcat log output:
I see the same error using JRuby 1.7.3 without using the jruby-openssl gem. I thought openssl was now included and the gem was unncessary with 1.7.3. And indeed, it works fine without the gem when running rails app from the command line. However, the warbled rails app running in tomcat causes the above error.
If I add the jruby-openssl (0.8.6) gem to the rails app gemfile then it works in tomcat (7.0) (and from command line) but I get many warnings like this (in tomcat):
.../WEB-INF/gems/gems/jruby-openssl-0.8.6/lib/shared/jruby-openssl.rb:16 warning: already initialized constant NO_PADDING
or this (from command line):
.../jruby-1.7.3/lib/ruby/gems/shared/gems/jruby-openssl-0.8.6/lib/shared/jruby-openssl.rb:16 warning: already initialized constant NO_PADDING
It seems that openssl in jruby 1.7.3 doesn't load properly when running in tomcat, but the jruby-openssl works both places, however, it duplicates code in jruby.
Could it be that the loading of the bouncy castle jar doesn't work when the stdlib is in a jar (jruby-stdlib.jar) itself? I notice bouncy-castle-java.rb uses Dir and File to locate bc* jars and I'm not sure how that works inside a jar.
Same problem here, running on windows jboss w/Jruby 1.7.5 and a rails 4.0.0 application. Here's my rather small app, for reference. Watchman.
For that matter, I get exactly the same problem if I do nothing more than this:
For great justice, here is the top portion of the stack trace that shows up: