I've had the same problem starting a Spring Boot 2.3 application with a minimal JRE that was created with jlink
. It would not start, and would keep throwing the following stacktrace:
Caused by: java.lang.IllegalStateException: No compatible attachment provider is available
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:602)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:586)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:538)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:515)
at reactor.tools.agent.ReactorDebugAgent.init(ReactorDebugAgent.java:56)
I found out that this ByteBuddyAgent
(from this link) requires the java module jdk.attach
to be included, which was not the case in my minimal JRE.
After adding the jdk.attach
module to my jlink
command under --add-modules
, the error went away and I could start my Spring Boot application again.