Re: please help : GroovyCastException: why ?

2020-02-24 Thread MG
Article articleTmp = (Article) Article; in Groovy is the same as Article articleTmp = (Article) Article.getClass(); in Java. Article.getClass() is of type Class, so casting it to Article will fail - what you want to do ist pass an Article instance, not the class, I presume... hth, mg On

please help : GroovyCastException: why ?

2020-02-24 Thread Mickaƫl SALMON
Hello, I'm using last Groovy version (3.0.1) in my Java application to run user defined scripts (Java based). Here is how a script is executed (sorry for the formatting) : public Object eval(String scriptName, String script, Map mapVariable) throws CochiseException {