5.1.1 to 5.1.4 changed how include() works, what now?
Posted: 03 Aug 2024, 16:07
My scripts have used include() since 4.x, and on 5.1.1 work fine, but on 5.1.4 I now get this error:
And of course my script no longer works, what am I supposed to use/do instead of include()?
Note the files are not classes, just files that contain additional groovy methods that I share between multiple scripts (and to reduce the size of the main script and avoid the method too large error)
Console Output: Select all
General error during instruction selection: Illegal script class: lib.__script_40d3cf174f7523b1087cd0f6148bd68b
net.filebot.InvalidInputException: Illegal script class: lib.__script_40d3cf174f7523b1087cd0f6148bd68b
at net.filebot.GroovyEngine$CompiledScriptClassLoader.processBytecode(Unknown Source)
at groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:687)
at groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
at groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
at org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
at org.codehaus.groovy.control.CompilationUnit$IPrimaryClassNodeOperation.doPhaseOperation(CompilationUnit.java:938)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:692)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:666)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:373)
at groovy.lang.GroovyClassLoader.lambda$parseClass$2(GroovyClassLoader.java:316)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314)
at net.filebot.GroovyEngine$CompiledScriptClassLoader.parseClass(Unknown Source)
at net.filebot.GroovyEngine.compile(Unknown Source)
at net.filebot.GroovyEngine.eval(Unknown Source)
at java.scripting/javax.script.AbstractScriptEngine.eval(Unknown Source)
at net.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.filebot.cli.ScriptShellBaseClass.executeScript(Unknown Source)
at net.filebot.cli.ScriptShellBaseClass.include(Unknown Source)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1333)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:165)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$3.invokeMethod(GroovyScriptEngineImpl.java:315)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at __script_fdf371a1979eefeba36325412c61578e.run(__script_fdf371a1979eefeba36325412c61578e:47)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:331)
at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:72)
at net.filebot.GroovyEngine.eval(Unknown Source)
at java.scripting/javax.script.AbstractScriptEngine.eval(Unknown Source)
at net.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.filebot.cli.ArgumentProcessor.runScript(Unknown Source)
at net.filebot.cli.ArgumentProcessor.run(Unknown Source)
at net.filebot.Main.main(Unknown Source)
1 error
Note the files are not classes, just files that contain additional groovy methods that I share between multiple scripts (and to reduce the size of the main script and avoid the method too large error)