Skip to content

Instantly share code, notes, and snippets.

@sdeleuze
Created July 3, 2018 07:37
Show Gist options
  • Save sdeleuze/55e002d9e2a91990b591f650f18d348c to your computer and use it in GitHub Desktop.
Save sdeleuze/55e002d9e2a91990b591f650f18d348c to your computer and use it in GitHub Desktop.
Spring Fu minimal Netty webapp compilation as native image with GraalVM 1.0 RC3
error: Detected a started Thread in the image heap. This is not supported. The object was reached from a static initializer. All static class initialization is done during native image construction, thus a static initializer cannot contain code that captures state dependent on the build machine. Write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Error: Detected a started Thread in the image heap. This is not supported. The object was reached from a static initializer. All static class initialization is done during native image construction, thus a static initializer cannot contain code that captures state dependent on the build machine. Write your own initialization methods and call them explicitly from your main entry point.
Trace: object io.netty.util.internal.ObjectCleaner$AutomaticCleanerReference
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object io.netty.util.internal.ConcurrentSet
method io.netty.util.internal.ObjectCleaner.access$000()
Call path from entry point to io.netty.util.internal.ObjectCleaner.access$000():
at io.netty.util.internal.ObjectCleaner.access$000(ObjectCleaner.java:34)
at io.netty.util.internal.ObjectCleaner$1.run(ObjectCleaner.java:51)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:238)
at com.oracle.svm.core.code.CEntryPointCallStubs.com_002eoracle_002esvm_002ecore_002eposix_002ethread_002ePosixJavaThreads_002epthreadStartRoutine_0028com_002eoracle_002esvm_002ecore_002eposix_002ethread_002ePosixJavaThreads_0024ThreadStartData_0029(generated:0)
Error: Processing image build request failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment