Jruby 1.5.1 issue with jruby-openssl 0.7

Hi guys,

We have a larger Rails application happily run on jruby 1.4.0, and
after some issues with sessions (session[] and flash[]
get’s nil-ed between requests; any ideas why?), we did upgrade on
1.5.1 and issue is gone.

On other hand, after I installed jruby-openssl 0.7 gem, Rails app
refused to start, with this trace:

Java package java' does not have a methodappend_features’
/…/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/javasupport/java.rb:50:in
method_missing' ... /.../jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:380:inload_file’
/…/jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in
new_constants_in' /.../jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:379:inload_file’
/…/jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:259:in
require_or_load' /.../jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:425:inload_missing_constant’
/…/jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in
const_missing_with_dependencies' /.../jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:437:inload_missing_constant’
/…/jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:96:in
`const_missing’

Removing jruby-openssl would solve the problem, but as we are using
openssl, this isn’t quite feasible solution :wink:

Any ideas would be much appreciated :slight_smile:

Best,
Sanel


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Do you have a longer backtrace than this? Or a way to reproduce it?
I’d like to get more information about when and where this is
happening.

/Nick

On Fri, Jul 23, 2010 at 9:52 AM, Sanel Z. [email protected] wrote:

Java package java' does not have a methodappend_features’
`require_or_load’
openssl, this isn’t quite feasible solution :wink:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Nick,

Sorry for a late reply. I played a little bit with this and could figure
out
what was happening. At least I think :slight_smile:

In our app we would ‘include Java’ inside Ruby module, like:

module Foo
include Java
java_import …
end

and for JRuby 1.4.0 this worked fine. On other hand, looks like this is
not
going to work with new JRuby (not sure why); placing ‘include Java’
outside
module would solve the issue.

Also, what is the strangest thing is how ‘include Java’ inside module
will work
for some ruby classes and for some will not. Also, I’m not sure how
jruby-openssl is related to this.

Do you have a longer backtrace than this?

I’m sending a full trace as attachment so it does not clutter mail
content.

Or a way to reproduce it?

Always reproducible when jruby-openssl is installed. Here is the list of
gems
we are using (updating gems will not solve the issue):

abstract (1.0.0)
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-jdbc-adapter (0.9.7)
activerecord-jdbcsqlite3-adapter (0.9.7)
activeresource (2.3.8)
activesupport (2.3.8)
addressable (2.1.2)
cancan (1.2.0)
columnize (0.3.1)
erubis (2.6.6)
faraday (0.4.6)
gdata (1.1.1)
gem_plugin (0.2.3)
geminstaller (0.5.6)
hpricot (0.8.2)
jdbc-sqlite3 (3.6.3.054)
jruby-openssl (0.7)
json-jruby (1.4.3.1)
mini_magick (1.3.1)
mongrel (1.1.5)
multi_json (0.0.4)
oauth2 (0.0.10)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
rspec (1.3.0)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3.2)
sources (0.0.1)
subexec (0.0.4)
uuidtools (2.1.1)

Thanks.

On Mon, Jul 26, 2010 at 7:58 AM, Sanel Z. [email protected] wrote:

end

and for JRuby 1.4.0 this worked fine. On other hand, looks like this is not
going to work with new JRuby (not sure why); placing ‘include Java’ outside
module would solve the issue.

Also, what is the strangest thing is how ‘include Java’ inside module will work
for some ruby classes and for some will not. Also, I’m not sure how
jruby-openssl is related to this.

I’ve found “include Java” to be problematic and we’re backtracking
from recommending it in programs. The problem is that it can inject
lots of unexpected constants into a namespace and sometimes cause
collisions. If you could try to make your programs work without it
that would be a start.

Do you have a longer backtrace than this?

I’m sending a full trace as attachment so it does not clutter mail content.

Would you mind creating an issue at http://bugs.jruby.org/ and attach
it there? I want to make sure it doesn’t get lost.

/Nick

activerecord-jdbc-adapter (0.9.7)
geminstaller (0.5.6)
rake (0.8.7)

We have a larger Rails application happily run on jruby 1.4.0, and

/…/jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I’ve found “include Java” to be problematic and we’re backtracking

If you could try to make your programs work without it
that would be a start.

Yes, I removed it from some essential parts, initialized on Rails
startup
and JRuby didn’t complain about it. But, my coworker tried the same
(he is using NetBeans) and JRuby complained, quite similar as in 1.4.0.

He noticed how one ‘include’ call is enough to resolve namespace.
Hm… I’m a bit confused about the things happening in behind :slight_smile:

Would you mind creating an issue at http://bugs.jruby.org/ and attach
it there? I want to make sure it doesn’t get lost.

Done. http://jira.codehaus.org/browse/JRUBY-4971

/Nick

Best,
Sanel


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs