Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1.4
    • Fix Version/s: JRuby 1.1.5
    • Component/s: Java Integration
    • Labels:
      None
    • Environment:
      Mac OSX, JDK 5, trunk r7573, jetty-rails 0.5
    • Number of attachments :
      0

      Description

      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.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        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"
        
        Show
        Charles Oliver Nutter added a comment - 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"
        Hide
        Charles Oliver Nutter added a comment -

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

        Show
        Charles Oliver Nutter added a comment - I don't see anything special about Opcodes. Frustrating.
        Hide
        Nick Sieger added a comment -

        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"
        
        Show
        Nick Sieger added a comment - 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"
        Hide
        Charles Oliver Nutter added a comment -

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

        Show
        Charles Oliver Nutter added a comment - Doesn't appear to be static final fields specifically. A simple test didn't show the same effect. Hmm.
        Hide
        Charles Oliver Nutter added a comment -

        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.

        Show
        Charles Oliver Nutter added a comment - 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.
        Hide
        Charles Oliver Nutter added a comment -

        Specs committed in r7678. All done!

        Show
        Charles Oliver Nutter added a comment - Specs committed in r7678. All done!
        Hide
        Fabio Kung added a comment -

        I can confirm it is working!

        Show
        Fabio Kung added a comment - I can confirm it is working!
        Hide
        Charles Oliver Nutter added a comment -

        Thanks Fabio!

        Show
        Charles Oliver Nutter added a comment - Thanks Fabio!

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Nick Sieger
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: