Skip to content

java.lang.ClassNotFoundException: nextflow.k8s.K8sPlugin during installation of nf-k8s plugin with [email protected] #6583

@paulvonallwoerden

Description

@paulvonallwoerden

Bug report

The newest release 25.10.0 of nextflow fails to automatically install the nf-k8s plugin.

During startup of Nextflow the error java.lang.ClassNotFoundException: nextflow.k8s.K8sPlugin occurs.

I am using the image docker.io/nextflow/nextflow@sha256:485a3cdf1ce4781266147c005e56847f06f326fe4f128afc8cdd8b735c3f58e2.

Expected behavior and actual behavior

Running a pipeline with the k8s executor is supposed to work out of the box. On version 25.04.8 (and on 24.*), it does; on 25.10.0, it doesn't.

Steps to reproduce the problem

# nextflow.config

process {
  executor = 'k8s'
  container = 'ubuntu:24.04'
  cpus = 1
  memory = '1 GB'
}
workDir = '/workspace/work'
k8s {
  namespace = 'default'
  storageClaimName = 'nfs-pvc'
  storageMountPath = '/workspace'
  client {
    server    = '<REDACTED>'
    token     = '<REDACTED>'
    verifySsl = false
  }
}
# pipeline/hello-world.nf

#!/usr/bin/env nextflow

process DO_WORK {
    container 'ubuntu:latest'
    pod = [
        [nodeSelector: ['kubernetes.io/hostname': 'vm02']],
        [hostPath: '/mnt/nfdata', mountPath: '/nfdata']
    ]

    cpus 1
    memory '1GB'
    
    script:
    """
    echo 'Hello, World!'
    """
}

workflow {
    DO_WORK()
}
nextflow -C nextflow.config run pipeline/hello-world.nf

Program output

Version 25.04.8
Nov-19 12:40:46.537 [main] DEBUG nextflow.cli.Launcher - $> nextflow -C nextflow.config run pipeline/hello-world.nf
Nov-19 12:40:47.111 [main] DEBUG nextflow.cli.CmdRun - N E X T F L O W  ~  version 25.04.8
Nov-19 12:40:47.190 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; embedded=false; plugins-dir=/workspace/.nextflow/plugins; core-plugins: nf-amazon@2.15.0-patch2,nf-azure@1.16.0-patch1,nf-cloudcache@0.4.3,nf-codecommit@0.2.3,nf-console@1.2.1,nf-google@1.21.1,nf-k8s@1.0.1,nf-tower@1.11.4-patch2,nf-wave@1.12.1
Nov-19 12:40:47.238 [main] INFO  o.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Nov-19 12:40:47.239 [main] INFO  o.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Nov-19 12:40:47.243 [main] INFO  org.pf4j.DefaultPluginManager - PF4J version 3.12.0 in 'deployment' mode
Nov-19 12:40:47.263 [main] INFO  org.pf4j.AbstractPluginManager - No plugins
Nov-19 12:40:47.297 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /workspace/nextflow.config
Nov-19 12:40:47.358 [main] DEBUG n.secret.LocalSecretsProvider - Secrets store: /workspace/.nextflow/secrets/store.json
Nov-19 12:40:47.364 [main] DEBUG nextflow.secret.SecretsLoader - Discovered secrets providers: [nextflow.secret.LocalSecretsProvider@4a29f290] - activable => nextflow.secret.LocalSecretsProvider@4a29f290
Nov-19 12:40:47.371 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Nov-19 12:40:48.238 [main] DEBUG nextflow.cli.CmdRun - Applied DSL=2 by global default
Nov-19 12:40:48.276 [main] DEBUG nextflow.cli.CmdRun - Launching `pipeline/hello-world.nf` [sharp_descartes] DSL2 - revision: e120e17ca7
Nov-19 12:40:48.284 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[nf-k8s@1.0.1]
Nov-19 12:40:48.284 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[nf-k8s@1.0.1]
Nov-19 12:40:48.286 [main] DEBUG nextflow.plugin.PluginUpdater - Installing plugin nf-k8s version: 1.0.1
Nov-19 12:40:48.299 [main] INFO  nextflow.plugin.PluginUpdater - Downloading plugin nf-k8s@1.0.1
Nov-19 12:40:50.166 [main] INFO  org.pf4j.util.FileUtils - Expanded plugin zip 'nf-k8s-1.0.1.zip' in 'nf-k8s-1.0.1'
Nov-19 12:40:50.174 [main] DEBUG nextflow.plugin.PluginUpdater - Failed atomic move for plugin /tmp/pf4j-update-downloader7636617921933569225/nf-k8s-1.0.1 -> /workspace/.nextflow/plugins/nf-k8s-1.0.1 - Reason: /tmp/pf4j-update-downloader7636617921933569225/nf-k8s-1.0.1 -> /workspace/.nextflow/plugins/nf-k8s-1.0.1: Invalid cross-device link - Fallback on safe move
Nov-19 12:40:53.650 [main] INFO  org.pf4j.AbstractPluginManager - Plugin '[email protected]' resolved
Nov-19 12:40:53.650 [main] INFO  org.pf4j.AbstractPluginManager - Start plugin '[email protected]'
Nov-19 12:40:53.698 [main] DEBUG nextflow.plugin.BasePlugin - Plugin started nf-k8s@1.0.1
Nov-19 12:40:53.858 [main] DEBUG nextflow.Session - Session UUID: 006df305-203e-48e3-b4a5-a03bf6ad139f
Nov-19 12:40:53.859 [main] DEBUG nextflow.Session - Run name: sharp_descartes
Nov-19 12:40:53.859 [main] DEBUG nextflow.Session - Executor pool size: 2
Nov-19 12:40:53.883 [main] DEBUG nextflow.file.FilePorter - File porter settings maxRetries=3; maxTransfers=50; pollTimeout=null
Nov-19 12:40:53.896 [main] DEBUG nextflow.util.ThreadPoolBuilder - Creating thread pool 'FileTransfer' minSize=10; maxSize=10; workQueue=LinkedBlockingQueue[-1]; allowCoreThreadTimeout=false

[TRUNCATED]
Version 25.10.0
Nov-19 12:50:21.142 [main] DEBUG nextflow.cli.Launcher - $> nextflow -C nextflow.config run pipeline/hello-world.nf
Nov-19 12:50:21.639 [main] DEBUG nextflow.cli.CmdRun - N E X T F L O W  ~  version 25.10.0
Nov-19 12:50:21.726 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /workspace/nextflow.config
Nov-19 12:50:21.794 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Nov-19 12:50:22.551 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; embedded=false; plugins-dir=/workspace/.nextflow/plugins; core-plugins: nf-amazon@3.4.1,nf-azure@1.20.2,nf-cloudcache@0.5.0,nf-codecommit@0.5.0,nf-console@1.3.0,nf-google@1.23.3,nf-k8s@1.2.2,nf-tower@1.17.1,nf-wave@1.16.1
Nov-19 12:50:22.610 [main] INFO  o.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Nov-19 12:50:22.613 [main] INFO  o.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Nov-19 12:50:22.617 [main] INFO  org.pf4j.DefaultPluginManager - PF4J version 3.12.0 in 'deployment' mode
Nov-19 12:50:22.635 [main] DEBUG nextflow.util.RetryConfig - Missing nextflow session - using default retry config
Nov-19 12:50:22.905 [main] INFO  org.pf4j.AbstractPluginManager - No plugins
Nov-19 12:50:22.907 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[nf-k8s@1.2.2]
Nov-19 12:50:22.907 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[nf-k8s@1.2.2]
Nov-19 12:50:23.258 [main] DEBUG n.plugin.HttpPluginRepository - Registry request: https://registry.nextflow.io/api/v1/plugins/dependencies?plugins=nf-k8s%401.2.2&nextflowVersion=25.10.0
- code: 200
- body: {"plugins":[{"id":"nf-k8s","downloadCount":1157,"downloadGhCount":17594,"releases":[{"version":"1.2.2","url":"https://registry.nextflow.io/api/v1/plugins/nf-k8s/1.2.2/download/nf-k8s-1.2.2.zip","date":"2025-10-21T15:57:16.23988Z","sha512sum":"4e709ed17ab0e3d813891c060103986b8abda6cf119332ab149d43d8b5b1dafbf7ea4b3e60b772194ac8f65ebc9e3c9f4ad5b09c01e0cc6c0ed6655e98a0c495","requires":">=25.09.2-edge","dependsOn":[],"downloadCount":868,"downloadGhCount":0,"status":"PUBLISHED","spec":null}],"projectUrl":"https://github.com/nextflow-io/nf-k8s","provider":"nextflow-io","description":null}]}
Nov-19 12:50:23.326 [main] DEBUG nextflow.plugin.PluginUpdater - Installing plugin nf-k8s version: 1.2.2
Nov-19 12:50:23.382 [main] INFO  org.pf4j.AbstractPluginManager - Plugin '[email protected]' resolved
Nov-19 12:50:23.383 [main] INFO  org.pf4j.AbstractPluginManager - Start plugin '[email protected]'
Nov-19 12:50:23.385 [main] ERROR org.pf4j.DefaultPluginFactory - nextflow.k8s.K8sPlugin
java.lang.ClassNotFoundException: nextflow.k8s.K8sPlugin
	at org.pf4j.PluginClassLoader.loadClass(PluginClassLoader.java:169)
	at org.pf4j.DefaultPluginFactory.create(DefaultPluginFactory.java:44)
	at org.pf4j.PluginWrapper.getPlugin(PluginWrapper.java:94)
	at org.pf4j.AbstractPluginManager.startPlugin(AbstractPluginManager.java:441)
	at nextflow.plugin.PluginUpdater.load0(PluginUpdater.groovy:412)
	at nextflow.plugin.PluginUpdater.installPlugin(PluginUpdater.groovy:225)
	at nextflow.plugin.PluginUpdater.prepareAndStart(PluginUpdater.groovy:171)
	at nextflow.plugin.PluginsFacade.start(PluginsFacade.groovy:401)
	at nextflow.plugin.PluginsFacade.load(PluginsFacade.groovy:291)
	at nextflow.plugin.Plugins.load(Plugins.groovy:50)
	at nextflow.cli.CmdRun.run(CmdRun.groovy:363)
	at nextflow.cli.Launcher.run(Launcher.groovy:515)
	at nextflow.cli.Launcher.main(Launcher.groovy:675)
Nov-19 12:50:23.388 [main] ERROR nextflow.cli.Launcher - @unknown
java.lang.NullPointerException: Cannot invoke "org.pf4j.Plugin.start()" because the return value of "org.pf4j.PluginWrapper.getPlugin()" is null
	at org.pf4j.AbstractPluginManager.startPlugin(AbstractPluginManager.java:441)
	at nextflow.plugin.PluginUpdater.load0(PluginUpdater.groovy:412)
	at nextflow.plugin.PluginUpdater.installPlugin(PluginUpdater.groovy:225)
	at nextflow.plugin.PluginUpdater.prepareAndStart(PluginUpdater.groovy:171)
	at nextflow.plugin.PluginsFacade.start(PluginsFacade.groovy:401)
	at nextflow.plugin.PluginsFacade.load(PluginsFacade.groovy:291)
	at nextflow.plugin.Plugins.load(Plugins.groovy:50)
	at nextflow.cli.CmdRun.run(CmdRun.groovy:363)
	at nextflow.cli.Launcher.run(Launcher.groovy:515)
	at nextflow.cli.Launcher.main(Launcher.groovy:675)

Environment

  • Nextflow version: [25.10.0]
  • Java version: openjdk 21.0.8 2025-07-15 LTS
  • Operating system: Linux
  • Bash version: GNU bash, version 5.2.15(1)-release (x86_64-amazon-linux-gnu)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions