Groovy
  1. Groovy
  2. GROOVY-5376

Incomprehensible Error Message Passing Partial Evaluated Lambda Function

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      When executing the code:

      #! /usr/bin/env groovy
      
      import groovy.sql.DataSet
      import groovy.sql.Sql
      
      @Grab ( 'org.xerial:sqlite-jdbc:3.7.2' )
      @GrabConfig ( systemClassLoader = true )
      def database
      final words = [ ]
      try {
        database = Sql.newInstance ( 'jdbc:sqlite:database.db' , 'org.sqlite.JDBC' )
        final wordsTable = new DataSet ( database , 'words' )
        ( 0 ..< 4 ).each { i ->
          words << wordsTable.findAll ( { j , item -> item.id == j }.curry ( i ) ).firstRow ( ).word
        }
      }
      finally {
        database?.close ( )
      }
      println words.join ( '' )
      

      the result is the error:

      Caught: groovy.lang.GroovyRuntimeException: Could not find the ClassNode for MetaClass: groovy.lang.MetaClassImpl@6c1826dc[class org.codehaus.groovy.runtime.CurriedClosure]
      groovy.lang.GroovyRuntimeException: Could not find the ClassNode for MetaClass: groovy.lang.MetaClassImpl@6c1826dc[class org.codehaus.groovy.runtime.CurriedClosure]

      which doesn't really tell the programmer anything useful about the executed code they wrote.

        Issue Links

          Activity

          Russel Winder created issue -
          Paul King made changes -
          Field Original Value New Value
          Link This issue relates to GROOVY-5377 [ GROOVY-5377 ]
          Jochen Theodorou made changes -
          Component/s groovy-runtime [ 16250 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
          Mark Thomas made changes -
          Workflow jira [ 12734299 ] Default workflow, editable Closed status [ 12746078 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
          Mark Thomas made changes -
          Workflow jira [ 12973769 ] Default workflow, editable Closed status [ 12980934 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Russel Winder
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development