Hi all, I tried to compile the hello plugin but I ...
# nextflow-plugins
p
Hi all, I tried to compile the hello plugin but I got the following error/stacktrace:
Copy code
$ ./gradlew check

> Task :plugins:nf-hello:compileGroovy FAILED
java.util.ServiceConfigurationError: Locale provider adapter "CLDR"cannot be instantiated.
        at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:200)
  (...)
        ... 12 more
Caused by: java.lang.IllegalArgumentException: newLimit > capacity: (55346993 > 27910144)
        at java.base/java.nio.Buffer.createLimitException(Buffer.java:398)
        at java.base/java.nio.Buffer.limit(Buffer.java:372)
        at java.base/java.nio.ByteBuffer.limit(ByteBuffer.java:1539)
        at java.base/java.nio.MappedByteBuffer.limit(MappedByteBuffer.java:331)
        at java.base/java.nio.MappedByteBuffer.limit(MappedByteBuffer.java:73)
        at java.base/jdk.internal.jimage.BasicImageReader.slice(BasicImageReader.java:213)
        at java.base/jdk.internal.jimage.BasicImageReader.readBuffer(BasicImageReader.java:372)
        at java.base/jdk.internal.jimage.BasicImageReader.getResourceBuffer(BasicImageReader.java:438)
        at java.base/jdk.internal.jimage.ImageReader.getResourceBuffer(ImageReader.java:199)
        at java.base/jdk.internal.module.SystemModuleFinders$SystemModuleReader.read(SystemModuleFinders.java:485)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:809)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:741)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:621)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:633)
        at java.base/java.lang.Class.forName(Class.java:584)
        at java.base/java.lang.Class.forName(Class.java:559)
        at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:859)
        at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1084)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
        at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
        at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.lambda$new$0(CLDRLocaleProviderAdapter.java:84)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:83)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
        ... 15 more

FAILURE: Build failed with an exception.
I googled the error message but I don't really understand what I saw. My local javac version is
avac 17.0.3.1
. Any idea ?
j
it seems related to your machine or the jdk. Maybe not enough memory? what's your distribution? it also fails if you run, for example,
./gradlew clean
?
p
@Jorge thanks for the answer. I'm away from my lab/code/source for the WE now. I don't think it was related to the jdk because when I added a --debug flag to gradle the trace showed that the code is compiled using an internal jdk distribution (in the gradle cache) based on eclipse. Nevertheless my jdk is openjdk. It also failed after I ran
./gradlew clean
as far as I remember.
I tried on another server, it works now 🤔
j
same jdk ? (insufficient) memory issue maybe ?
🤷‍♂️ 1
j
I just started exploring custom plugins and had a similar issue to your other post ( https://github.com/nextflow-io/nf-hello/issues/16 ) but
make compile && make assemble
resolved that after getting onto the latest java version
✅ 1
I'm on mac os + latest master HEAD with:
Copy code
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment Homebrew (build 21.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.2, mixed mode, sharing)