diff -r 4c2557ab304e -r 127ca611f19b src/hotspot/share/jfr/jni/jfrJniMethod.cpp --- a/src/hotspot/share/jfr/jni/jfrJniMethod.cpp Mon Nov 25 15:21:44 2019 +0000 +++ b/src/hotspot/share/jfr/jni/jfrJniMethod.cpp Mon Nov 25 18:38:01 2019 +0100 @@ -192,7 +192,9 @@ return JNI_TRUE; } if (!JfrRecorder::create(simulate_failure == JNI_TRUE)) { - JfrJavaSupport::throw_illegal_state_exception("Unable to start Jfr", thread); + if (!thread->has_pending_exception()) { + JfrJavaSupport::throw_illegal_state_exception("Unable to start Jfr", thread); + } return JNI_FALSE; } return JNI_TRUE;