GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1168

Error on "Run As | Groovy Script" for script with class definition

    Details

    • Number of attachments :
      4

      Description

      The following script:

      Foo foo = new Foo()
      
      class Foo {
          int f
      }
      

      produces the following error to stderr when launched with "Run As | Groovy Script":

      Caught: java.lang.AbstractMethodError
      java.lang.AbstractMethodError
      
      1. ClassTest.launch
        2 kB
        Bob Tiernay
      2. groovy-error.tgz
        2 kB
        Daniel Galán y Martins
      1. eclipse-versions.png
        75 kB
      2. groovy-eclipse-compile-bug.png
        77 kB

        Activity

        Hide
        Andrew Eisenberg added a comment -

        Thanks for digging into this. I was not aware that everything from groovy.home was automatically added to your script's runtime classpath. I was able to reproduce the little test you did with the groovy console.

        We need to move all non-essential jars out of that folder into a new location where they will not conflict with running scripts.

        I'm still not sure why I was not seeing the same problem that you were.

        Show
        Andrew Eisenberg added a comment - Thanks for digging into this. I was not aware that everything from groovy.home was automatically added to your script's runtime classpath. I was able to reproduce the little test you did with the groovy console. We need to move all non-essential jars out of that folder into a new location where they will not conflict with running scripts. I'm still not sure why I was not seeing the same problem that you were.
        Hide
        Andrew Eisenberg added a comment -

        Daniel, I think that you are having a different problem, but it may be worth trying anyway. Can you try moving your groovypp jar to a new folder?

        Show
        Andrew Eisenberg added a comment - Daniel, I think that you are having a different problem, but it may be worth trying anyway. Can you try moving your groovypp jar to a new folder?
        Hide
        Daniel Galán y Martins added a comment - - edited

        Andrew, thanks for your instructions, I performed them as you told, but the problem still remains.
        I tried Bobs suggestion, and removed the groovypp-0.4.248_1.8.0.jar library, which seemed to work.
        So I'm taking this workaround for now, hopping that it won't break to much other things, until there is an official bugfix release.
        Thanks for your dedication on this topic!

        Show
        Daniel Galán y Martins added a comment - - edited Andrew, thanks for your instructions , I performed them as you told, but the problem still remains. I tried Bobs suggestion , and removed the groovypp-0.4.248_1.8.0.jar library, which seemed to work. So I'm taking this workaround for now, hopping that it won't break to much other things, until there is an official bugfix release. Thanks for your dedication on this topic!
        Hide
        Andrew Eisenberg added a comment -

        That's good that it turned out to be the same issue. I will implement the fix to move the groovypp jar from the /lib folder to the /extras folder. More jars may be moved there in order for the default classpath of scripts to not get too messy.

        Show
        Andrew Eisenberg added a comment - That's good that it turned out to be the same issue. I will implement the fix to move the groovypp jar from the /lib folder to the /extras folder. More jars may be moved there in order for the default classpath of scripts to not get too messy.
        Hide
        Andrew Eisenberg added a comment -

        I am tentatively closing this issue since I committed the change for removing the groovypp jar from the classpath of scripts.

        If you continue to have trouble executing scripts, please re-open.

        Show
        Andrew Eisenberg added a comment - I am tentatively closing this issue since I committed the change for removing the groovypp jar from the classpath of scripts. If you continue to have trouble executing scripts, please re-open.

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Bob Tiernay
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: