Issue Details (XML | Word | Printable)

Key: JRUBY-2959
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Nick Sieger
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

jetty-rails broken by trunk

Created: 29/Aug/08 10:46 PM   Updated: 12/Jan/09 04:28 PM   Resolved: 10/Sep/08 06:41 PM
Return to search
Component/s: Java Integration
Affects Version/s: JRuby 1.1.4
Fix Version/s: JRuby 1.1.5

Time Tracking:
Not Specified

Environment: Mac OSX, JDK 5, trunk r7573, jetty-rails 0.5


 Description  « Hide

Install the jetty-rails gem (0.5) and simply run "jruby -S jetty_rails" in any rails app to reproduce the problem.

See stack overflow trace at http://gist.github.com/8085.



Charles Oliver Nutter added a comment - 10/Sep/08 02:54 AM

This appears to be a glitch in how I set up the append_features method for "interface modules", that causes them to forever recurse. It doesn't happen with all interfaces; I think it may only affect interfaces that extend other interfaces, or something like that. As such, I have a fix but not a test, and we must figure out a test that can work against normal JDK classes.

Fix is committed in r7671. Still open pending tests.

FYI, my case to reproduce it was:

jruby -w -rjava -e "class Foo; import Java::org.objectweb.asm.Opcodes; include Opcodes; end; Foo.new"

Charles Oliver Nutter added a comment - 10/Sep/08 03:02 AM

I don't see anything special about Opcodes. Frustrating.


Nick Sieger added a comment - 10/Sep/08 08:31 AM

Interfaces that have static final fields in them? I get the same stack overflow with java.sql.ParameterMetaData:

$ jruby -w -rjava -e "class Foo; import Java::java.sql.ParameterMetaData; include ParameterMetaData; end; Foo.new"

Charles Oliver Nutter added a comment - 10/Sep/08 06:14 PM

Doesn't appear to be static final fields specifically. A simple test didn't show the same effect. Hmm.


Charles Oliver Nutter added a comment - 10/Sep/08 06:19 PM

Oops, nevermind. I tested against trunk, which is of course fixed. It does appear to be the static final field thing, probably because that causes it to add things to the singleton class, and so the included module inserts some extra fun into the singleton-side hierarchy. Makes sense in my head, anyway.

Specs coming.


Charles Oliver Nutter added a comment - 10/Sep/08 06:41 PM

Specs committed in r7678. All done!


Fabio Kung added a comment - 11/Sep/08 09:57 PM

I can confirm it is working!


Charles Oliver Nutter added a comment - 12/Sep/08 05:58 AM

Thanks Fabio!