Hidden startup exception, JFR Crashs with javaagents

Bernd Eckenfels ecki at zusammenkunft.net
Wed Jun 4 18:50:47 UTC 2025


Hello,

While playing round with JavaAgents which emit JFR Events I could trigger a
class circularity problem (Most likely my (or Copilot) fault, tips welcome).


However, this report is about the fact that the actual exception is not
printed and the actual error Message is very ugly:

> java -XX:StartFlightRecording=filename=out.jfr,settings=single.jfc
> -javaagent:.\target\agent-x-0.1.0.jar=TestApp:test .\TestApp.java OpenJDK
> 64-Bit Server VM warning: Sharing is only supported for boot loader
> classes because bootstrap classpath has been appended
> [0.064s][error][jfr,startup] java/lang/WeakPairMap$Pair$Weak Error
> occurred during initialization of VM Failure when starting JFR
> on_create_vm_3


find the details here:

https://github.com/ecki/jfr-agent-x


(also when looking at Xlog:exceptions=error it feels like its handele
multiple times)

Gruß
Bernd



More information about the hotspot-jfr-dev mailing list