<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
This change looks good to me.<br>
Coleen<br>
<br>
<div class="moz-cite-prefix">On 6/9/20 10:46 AM, Poonam Parhar
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:ea66c872-011f-d709-8097-da2f9f89b549@oracle.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hello,<br>
<br>
Please review this simple change for improving diagnostics around
class verification and linking failures:<br>
<br>
Bug: <a class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8243290"
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8243290</a><br>
Webrev: <a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~poonam/8243290/webrev.00/"
moz-do-not-send="true">http://cr.openjdk.java.net/~poonam/8243290/webrev.00/</a><br>
<br>
Problem: During the class redefinition process, if a class
verification fails because it could not find a class referenced in
the class being redefined, the printed NoClassDefFoundError error
message is not very helpful. It does not print the class name for
which NoClassDefFoundError was encountered, and that makes it very
hard to find the real cause of redefinition failure.<br>
<br>
The proposed solution prints the class name during class linking
and verification failures. Example output produced with these
changes:<br>
<br>
With 'redefine' tag:<br>
<pre> [java] [3.243s][debug][redefine,class,load ] loaded name=org.apache.commons.logging.impl.Jdk14Logger (avail_mem=819540K)
[java] [3.243s][debug][redefine,class,load ] loading name=org.apache.commons.logging.impl.Log4JLogger kind=101 (avail_mem=819540K)
[java] [3.244s][info ][redefine,class,load,exceptions] link_class exception: 'java/lang/NoClassDefFoundError org/apache/log4j/Priority'
[java] Java Result: 1</pre>
With 'verification' tag:<br>
<pre> [java] [49.702s][info ][verification] Verification for org.apache.commons.logging.impl.Log4JLogger has exception pending 'java.lang.NoClassDefFoundError org/apache/log4j/Priority'
[java] [49.702s][info ][verification] End class verification for: org.apache.commons.logging.impl.Log4JLogger
</pre>
<br>
Improved error message:<br>
<pre> [java] Exception in thread "main" java.lang.InternalError: class redefinition failed: invalid class
[java] at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
[java] at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:167)
[java] at Main.main(Unknown Source)</pre>
<br>
Thanks,<br>
Poonam<br>
<br>
</blockquote>
<br>
</body>
</html>