groovy
  1. groovy
  2. GROOVY-5157

Incorrect byte code produced, error "groovy.lang.MissingPropertyException: No such property: param0"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Grails 2.0 RC1/2/3 Mac OS X Lion, Java 1.6.0_29
    • Number of attachments :
      0

      Description

      Since upgrading to Grails 2 which brings a newer release of groovy compared to grails 1.3.7 we started getting the error:

      groovy.lang.MissingPropertyException: No such property: param0
      

      ...inside some of our tests.

      If you look at the code causing this:

      https://github.com/jCatalog/weceem-plugin/blob/master/grails-app/domain/org/weceem/content/WcmContent.groovy#L254

      ... you can see there is code copying "this" to a local var "c" and then on the line that fails "this.ident()" is used. This causes the "bad bytecode". If you change it to "c.ident()" it works.

      "But how can reproduce this?!" I hear you ask enthusiastically.

      The answer: https://github.com/jCatalog/weceem-plugin

      Check out the code, then grails test-app using Grails 2 RC2 or higher.

      Open the test reports in ./target/test-reports/html/index.html

      Many tests fail due to other changes in Grails, but the test you are interested in is "SecurityServiceTests"

        Activity

        Hide
        Roshan Dawrani added a comment -

        I just cloned weceem-plugin and ran the tests with Grails RC3 and got no failures on SecurityServiceTests. All its 4 tests passed for me.

        Show
        Roshan Dawrani added a comment - I just cloned weceem-plugin and ran the tests with Grails RC3 and got no failures on SecurityServiceTests. All its 4 tests passed for me.
        Hide
        blackdrag blackdrag added a comment -

        seems like there was a Grails bug causing this issue, thus I close it as "cannot reproduce".

        Show
        blackdrag blackdrag added a comment - seems like there was a Grails bug causing this issue, thus I close it as "cannot reproduce".
        Hide
        Marc Palmer added a comment -

        Sorry guys there must be an O/S or other difference. This happens for me and Graeme on RC3

        Show
        Marc Palmer added a comment - Sorry guys there must be an O/S or other difference. This happens for me and Graeme on RC3
        Hide
        CÚdric Champeau added a comment -

        I checked out the project. Unmodified, the "SecurityServiceTests" pass. If I update grails-app/domain/org/weceem/content/WcmContent.groovy#L254 to use this.ident() instead of c.ident(), test fails, but with a different error :

        No signature of method: org.weceem.html.WcmHTMLContent.ident() is applicable for argument types: () values: [] Possible solutions: ident(), ident(), ident(), count(), count(), count()
        

        I don't really know what to think...

        Show
        CÚdric Champeau added a comment - I checked out the project. Unmodified, the "SecurityServiceTests" pass. If I update grails-app/domain/org/weceem/content/WcmContent.groovy#L254 to use this.ident() instead of c.ident() , test fails, but with a different error : No signature of method: org.weceem.html.WcmHTMLContent.ident() is applicable for argument types: () values: [] Possible solutions: ident(), ident(), ident(), count(), count(), count() I don't really know what to think...
        Hide
        Pascal Schumacher added a comment -

        Can this be closed?

        Show
        Pascal Schumacher added a comment - Can this be closed?
        Hide
        blackdrag blackdrag added a comment -

        since Marc did not answer anymore I assume he worked around the issue or it turned out to be fixed somehow, or something else... anyway, we could still not reproduce it, so I close it

        Show
        blackdrag blackdrag added a comment - since Marc did not answer anymore I assume he worked around the issue or it turned out to be fixed somehow, or something else... anyway, we could still not reproduce it, so I close it

          People

          • Assignee:
            blackdrag blackdrag
            Reporter:
            Marc Palmer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: