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

trying access noon static field from static method leads to VerifyError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6.1
    • 1.6.4, 1.7-beta-1
    • Compiler
    • None

    Description

      I am compiling this code on the command line:

      package pack;
      class FromSrc {
      def x =

      { println "hello!" }

      static main(String[] args)

      { x() }


      }

      > groovyc pack/FromSrc.groovy
      > groovy pack/FromSrc

      And there is an exception thrown:

      Exception in thread "main" java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            werdna Andrew Eisenberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: