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

groovysh does not run when CLASSPATH includes embeddable/groovy-all.jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.6
    • 1.6-rc-1, 1.5.8, 1.7-beta-1
    • Groovysh
    • None
    • Mac OS X Leopard 10.5.5
    • Patch

    Description

      groovysh does not run when CLASSPATH includes embeddable/groovy-all.jar. groovy, groovyc, and groovyConsole work fine.

      $ echo $CLASSPATH

      $ groovysh
      Groovy Shell (1.5.6, JVM: 1.5.0_16-133)
      Type 'help' or '\h' for help.
      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      groovy:000> \q

      $ export CLASSPATH=$GROOVY_HOME/embeddable/groovy-all-1.5.6.jar

      $ groovysh
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:101)
      at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
      Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.codehaus.groovy.tools.shell.util.HelpFormatter@d4f27' with class 'org.codehaus.groovy.tools.shell.util.HelpFormatter' to class 'org.apache.commons.cli.HelpFormatter'
      at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:340)
      at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:1997)
      at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2591)
      at groovy.lang.MetaClassImpl.setProperties(MetaClassImpl.java:1291)
      at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1268)
      at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1185)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:809)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:230)
      at org.codehaus.groovy.tools.shell.Main.main(Main.groovy:43)

      Attachments

        1. 3079Patch_v17X.txt
          1 kB
          Roshan Dawrani
        2. 3079Patch_v16X.txt
          1 kB
          Roshan Dawrani
        3. 3079Patch_v15X.txt
          1 kB
          Roshan Dawrani

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              thebrain The Brain
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: