Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-681

MissingPropertyException when trying to call a static method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-7
    • 1.0-beta-7
    • None
    • None
    • Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

    Description

      The following code:

      import org.apache.velocity.app.*;

      Velocity.init();

      results in the following stack trace:

      Caught: groovy.lang.MissingPropertyException: No such property: Velocity for class: tester
      groovy.lang.MissingPropertyException: No such property: Velocity for class: tester
      at groovy.lang.MetaClass.getProperty(MetaClass.java:697)
      at groovy.lang.GroovyObjectSupport.getProperty(GroovyObjectSupport.java:65)
      at groovy.lang.Script.getProperty(Script.java:85)
      at org.codehaus.groovy.runtime.InvokerHelper.getGroovyObjectProperty(InvokerHelper.java:201)
      at tester.run(/linux/home/tildahl/cvs/qwela/src/com/qwela/db/tester.groovy:3)

      It looks like groovy think Velocity is a property when it is a class
      and I'm trying to call a static method in the class.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tildahl Michael Tildahl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: