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

Groovy Console ClassCastException with groovy/ui/Console.groovy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.0-JSR-6
    • None
    • None
    • Tried with JRE 1.5.0_06 and 1.6.0-beta2-b81, WinXPSP2 and tested against CVS HEAD (as built by "maven"), Groovy reports itself as 1.0-RC-01-SNAPSHOT

    Description

      1. cvs checkout
      2. maven
      3. wait
      4. .\target\install\bin\groovyConsole.bat
      5. observe the stack trace below trace
      6. zip -d groovy-1.0-RC-01-SNAPSHOT.jar groovy/ui/Console.groovy
      deleting: groovy/ui/Console.groovy
      7. .\target\install\bin\groovyConsole.bat
      8. observe that it starts now

      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:589)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:131)
      at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160)
      Caused by: java.lang.ClassCastException: groovy.ui.Console cannot be cast to groovy.ui.Console
      at gjdk.groovy.ui.Console_GroovyReflector.invoke(Unknown Source)
      at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:657)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:350)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:156)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175)
      at groovy.ui.Console.main(Console.groovy:76)
      ... 6 more

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            mdaniel Matthew Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: