nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

groovy.lang.MissingMethodException after upgrading to latest Nextflow release

Open dmacguigan opened this issue 1 month ago • 3 comments

I'm encountering an error message after upgrading from Nextflow 25.04.3 to the latest release (25.10.2). My NF config worked perfectly fine with the previous version.

Dec-09 16:14:39.042 [Task submitter] DEBUG nextflow.processor.TaskProcessor - Handling unexpected condition for
  task: name=WF1:COVERAGE:coverage (SRR21843972); work-dir=/scratch02/public/pool/genomics/macguigand/MitoPilot_workshop/test_project_complete/run_01/work/3f/7fa81afd6cecf79936bd248805183f
  error [groovy.lang.MissingMethodException]: No signature of method: groovy.util.ConfigObject.multiply() is applicable for argument types: (Integer) values: [1]

groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.multiply() is applicable for argument types: (Integer) values: [1]
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:73)
	at org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:163)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
	at _nf_config_5bc80b07$_run_closure3$_closure7.doCall(_nf_config_5bc80b07:15)
	at _nf_config_5bc80b07$_run_closure3$_closure7.doCall(_nf_config_5bc80b07)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:280)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
	at groovy.lang.Closure.call(Closure.java:433)
	at groovy.lang.Closure.call(Closure.java:412)
	at nextflow.processor.LazyMap.resolveImpl(TaskConfig.groovy:698)
	at nextflow.processor.LazyMap.resolveImpl(TaskConfig.groovy)
	at nextflow.processor.LazyMap.resolve(TaskConfig.groovy:659)
	at nextflow.processor.LazyMap.getValue(TaskConfig.groovy:726)
	at nextflow.processor.LazyMap.get(TaskConfig.groovy:721)
	at nextflow.processor.TaskConfig.get(TaskConfig.groovy:153)
	at nextflow.processor.TaskConfig.getClusterOptions(TaskConfig.groovy:453)
	at nextflow.executor.AbstractGridExecutor.addClusterOptionsDirective(AbstractGridExecutor.groovy:140)
	at nextflow.executor.SgeExecutor.getDirectives(SgeExecutor.groovy:85)
	at nextflow.executor.AbstractGridExecutor.getDirectives(AbstractGridExecutor.groovy:129)
	at nextflow.executor.AbstractGridExecutor.getHeaders(AbstractGridExecutor.groovy:101)
	at nextflow.executor.AbstractGridExecutor.getHeaderScript(AbstractGridExecutor.groovy:85)
	at nextflow.executor.AbstractGridExecutor.createBashWrapperBuilder(AbstractGridExecutor.groovy:80)
	at nextflow.executor.GridTaskHandler.createTaskWrapper(GridTaskHandler.groovy:214)
	at nextflow.executor.GridTaskHandler.prepareLauncher(GridTaskHandler.groovy:106)
	at nextflow.processor.TaskPollingMonitor.submit(TaskPollingMonitor.groovy:274)
	at nextflow.processor.TaskPollingMonitor.submitPendingTasks(TaskPollingMonitor.groovy:659)
	at nextflow.processor.TaskPollingMonitor.submitLoop(TaskPollingMonitor.groovy:470)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	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:1339)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1094)
	at groovy.lang.MetaClassImpl.invokeMethodClosure(MetaClassImpl.java:1017)
	at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1213)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1094)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
	at groovy.lang.Closure.call(Closure.java:433)
	at groovy.lang.Closure.call(Closure.java:412)
	at groovy.lang.Closure.run(Closure.java:505)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Dec-09 16:14:39.059 [Task submitter] DEBUG nextflow.Session - Session aborted -- Cause: No signature of method: groovy.util.ConfigObject.multiply() is applicable for argument types: (Integer) values: [1]

The nextflow log file and my config file are attached below. Any help would be greatly appreciated.

nextflow.log nf_config.txt

Environment

  • Nextflow version: 25.10.2.10555
  • Java version: 21.0.2
  • Operating system: Linux
  • Bash version: GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)

dmacguigan avatar Dec 09 '25 21:12 dmacguigan

Also I should note that this bug is somewhat time sensitive, as I'm supposed to be running a workshop using this nextflow config on Thursday (12/11)

dmacguigan avatar Dec 09 '25 21:12 dmacguigan

It's hard to say for sure without a more minimal example (minimal config + script), but since the error is coming from line 15:

    if (((opts.memory * task.attempt) / opts.cpus) > 8) {

My guess is that opts, which I assume is a process input, is missing the memory property. For some reason opts is a ConfigObject, which is a special kind of map that returns an empty map when a missing property is accessed. This is mainly used for nested config options, so I'm not sure how you got it to be a ConfigObject in the first place

bentsherman avatar Dec 09 '25 23:12 bentsherman

Thanks for the quick response! My full codebase is here. opts is a process input read from an SQL database, see here and here for an example.

Mostly I'm confused about what changed between the two Nextflow versions that would cause this to stop working. If you have any thoughts, I'm all ears. I have no idea how opts became a ConfigObject.

dmacguigan avatar Dec 10 '25 14:12 dmacguigan

It would be best to provide a minimal example that reproduces the issue

bentsherman avatar Dec 12 '25 14:12 bentsherman