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

Code crashing in new shell but not in old

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-3
    • 1.1-rc-1
    • None
    • None
    • Windows XP, Java 6

    Description

      I've encountered a weird behavior. Some code crashes in the new shell, but not in the old one.

      See the session below.
      The same code in the new shell works very well.

      Microsoft Windows XP [Version 5.1.2600]
      (C) Copyright 1985-2001 Microsoft Corp.

      C:\Documents and Settings\Guillaume Laforge>set NEWSHELL=true

      C:\Documents and Settings\Guillaume Laforge>groovysh
      Groovy Shell (1.1-rc-1-SNAPSHOT, JVM: 1.6.0_02-b06)
      Type 'help' or '\h' for help.
      -------------------------------------------------------------------------------------------------------------
      groovy:(0):000> time =

      { ===> null groovy:(0):001> it() ===> null groovy:(0):002> }

      001> time =

      { 002> it() 003> }

      ERROR groovy.lang.MissingMethodException: No signature of method: java.io.StringWriter.doCall() is applicable
      for argument types: () values: {}
      at groovy.lang.MetaClassImpl.invokeMissingMethod (MetaClassImpl.java:558)
      at groovy.lang.MetaClassImpl.invokeMissingMethod (MetaClassImpl.java:529)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:771)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at org.codehaus.groovy.runtime.Invoker.invokePojoMethod (Invoker.java:87)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:75)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeClosure (ScriptBytecodeAdapter.java:612)
      at groovysh_evaluate$_run_closure1.doCall (groovysh_evaluate:2)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:57)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:222)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at groovy.lang.Closure.call (Closure.java:292)
      at groovy.lang.GString.writeTo (GString.java:155)
      at groovy.lang.GString.toString (GString.java:133)
      at org.codehaus.groovy.reflection.CachedClass.coerceGString (CachedClass.java:181)
      at org.codehaus.groovy.reflection.ParameterTypes.coerceArgumentsToClasses (ParameterTypes.java:92)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:535)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at org.codehaus.groovy.runtime.Invoker.invokePojoMethod (Invoker.java:87)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:75)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.Groovysh.setLastResult (Groovysh.groovy:92)
      at org.codehaus.groovy.tools.shell.Groovysh.this$3$setLastResult (Groovysh.groovy)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:57)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.setProperty (MetaClassImpl.java:1726)
      at groovy.lang.MetaClassImpl.setProperty (MetaClassImpl.java:2362)
      at sun.reflect.GeneratedMethodAccessor11.invoke (Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:120)
      at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke (StdMetaMethod.java:18)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at org.codehaus.groovy.runtime.Invoker.invokePojoMethod (Invoker.java:87)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:75)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.Shell.setProperty (Shell.groovy)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setGroovyObjectProperty (ScriptBytecodeAdapter.ja
      va:571)
      at org.codehaus.groovy.tools.shell.Groovysh.execute (Groovysh.groovy:182)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:120)
      at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke (StdMetaMethod.java:18)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.jav
      a:66)
      at org.codehaus.groovy.tools.shell.Shell.leftShift (Shell.groovy:121)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:120)
      at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke (StdMetaMethod.java:18)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.ShellRunner.work (ShellRunner.groovy:88)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:57)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.jav
      a:66)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0 (ScriptBytecodeAdapter.jav
      a:99)
      at org.codehaus.groovy.tools.shell.ShellRunner.run (ShellRunner.groovy:57)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run (InteractiveShellRunner.groovy)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:57)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN (ScriptBytecodeAdapter.java:
      118)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0 (ScriptBytecodeAdapter.java:
      142)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run (InteractiveShellRunner.groovy:64)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:120)
      at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke (StdMetaMethod.java:18)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0 (ScriptBytecodeAdapter.java:201)
      at org.codehaus.groovy.tools.shell.Groovysh.run (Groovysh.groovy:446)
      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:597)
      at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection (CachedMethod.java:100)
      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:120)
      at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke (StdMetaMethod.java:18)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:756)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:598)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.Groovysh.main (Groovysh.groovy:591)
      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:597)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader (GroovyStarter.java:101)
      at org.codehaus.groovy.tools.GroovyStarter.main (GroovyStarter.java:130)
      groovy:(0):000>

      Attachments

        Activity

          People

            user57 Jason Dillon
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: