Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
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.
Attachments
Issue Links
- relates to
-
GROOVY-5377 CLONE - Incomprehensible Error Message Passing Partial Evaluated Lambda Function (improved error message for normal closure not on classpath case)
- Closed