<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Unfortunately, ClassFile API is not used to produce verification error messages by hotspot.  You can use ClassFile.verify to verify after generating a class if you encounter an error, or toggle the verification or bytecode dumping in your application with a
 system property for easier reproduction and debugging. For more serviceability questions, you can ask about instrumentation and such at serviceability-dev list.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Chen</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> classfile-api-dev <classfile-api-dev-retn@openjdk.org> on behalf of Rafael Winterhalter <rafael.wth@gmail.com><br>
<b>Sent:</b> Thursday, August 15, 2024 4:33 PM<br>
<b>To:</b> classfile-api-dev <classfile-api-dev@openjdk.org><br>
<b>Subject:</b> Display verification error on retransformations</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>if a Java agent fails to retransform due to a verification error (using Instrumentation.retransformClasses), this error does not contain a message. This is like it used to be for all verification errors, when a class was loaded for the first time, but
 this feature of displaying a message and byte code was added later. I understand that retransformation might trigger multiple classes where many of them could be faulty, but even if only the first error is displayed (and possibly the name of the class in question),
 this would be of great help when debugging.</div>
<div><br>
</div>
<div>This might not even be the right mailing list for this, but as you are touching class files and since this API likely will be used to implement agents, possibly this mail just meets the right people to ask for a background? Is this a feature that was considered
 for the JVM?<br>
</div>
<div><br>
</div>
<div>Thanks, Rafael<br>
</div>
</div>
</div>
</body>
</html>