Quentin Duvert
01/27/2026, 2:55 PMjava.lang.UnsupportedClassVersionError: nextflow/executor/slurm_no_memory/SlurmNoMemoryPlugin has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognises class file versions up to 55.0
To fix this, I attempted to compile the plugin using Java 11. The build completes successfully, but I still get the same error on the cluster. I checked the compiled classes with this command:
find build/classes/groovy/main/ -name '*.class' -exec javap -verbose {} 2>/dev/null \; | grep 'major'
and the output still shows major version: 61 instead of 55.
I also tried building the plugin inside a Singularity container, but the problem remains.
Below is my build.gradle. If anyone has suggestions on how to force Gradle/Groovy to compile the plugin with Java 11 bytecode, I would really appreciate your help.
Thanks in advance!Quentin Duvert
01/27/2026, 2:56 PMplugins {
id 'io.nextflow.nextflow-plugin' version '0.0.1-alpha'
}
compileJava.options.fork = true
compileJava.options.forkOptions.executable = '/usr/bin/javac'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
tasks.withType(JavaCompile) {
options.release = 11
}
version = '0.1.0'
nextflowPlugin {
nextflowVersion = '24.10.0'
provider = 'CUBIC-Curie'
className = 'nextflow.executor.slurm_no_memory.SlurmNoMemoryPlugin'
extensionPoints = [
'nextflow.executor.slurm_no_memory.SlurmNoMemoryExecutor',
]
}
sourceSets {
main.java.srcDirs = []
main.groovy.srcDirs = ['src/main/groovy']
main.resources.srcDirs = ['src/resources']
test.groovy.srcDirs = ['src/test/groovy']
test.java.srcDirs = []
test.resources.srcDirs = ['src/testResources']
}
configurations {
// Exclude slf4j-api to avoid conflicts with Nextflow's logging
runtimeClasspath.exclude group: 'org.slf4j', module: 'slf4j-api'
}
ext {
nextflowVersion = '24.10.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
dependencies {
compileOnly "io.nextflow:nextflow:$nextflowVersion"
compileOnly 'org.slf4j:slf4j-api:2.0.17'
compileOnly 'org.pf4j:pf4j:3.12.0'
testImplementation "org.apache.groovy:groovy:4.0.26"
testImplementation "org.apache.groovy:groovy-nio:4.0.26"
testImplementation "io.nextflow:nextflow:$nextflowVersion"
testImplementation "org.apache.groovy:groovy-test:4.0.26"
testImplementation "cglib:cglib-nodep:3.3.0"
testImplementation "org.objenesis:objenesis:3.1"
testImplementation "org.spockframework:spock-core:2.3-groovy-4.0"
testImplementation "org.spockframework:spock-junit4:2.3-groovy-4.0"
testImplementation "com.google.jimfs:jimfs:1.1"
testImplementation(testFixtures("io.nextflow:nextflow:$nextflowVersion"))
testImplementation(testFixtures("io.nextflow:nf-commons:$nextflowVersion"))
}Ben Sherman
01/27/2026, 3:24 PMQuentin Duvert
01/27/2026, 3:28 PM