about NoClassDefFoundErrors

John Rose john.r.rose at oracle.com
Fri Jan 25 13:51:14 PST 2013


On Jan 25, 2013, at 7:04 AM, Jochen Theodorou wrote:

> I just noticed something interesting. I had a small program that constantly failed with the famous NoClassDefFoundError, that is still such an major annoyance, even in jdk7u11. I tried out jdk8b78 and the program failed to start as well. But this time because I tried to lookup a virtual method on an interface that does not have that method. In all cases of this handle being called later the method exists in the end, but at the Lookup it did not - still jdk7 did not complain. I assume strongly this is a bug in jdk7

Can you give me a small test case or sketch of this interface and the relevant implementation?  Is it a simple failure in Lookup?

> Now the fun part is: once I fixed those two problems, the very same program under the very same jdk7u11 did no longer fail with the class exception. It could be that by chance the conditions for the problem have changed enough to not appear again anymore... or there is something leaking from those LOOKUP.findVirtual calls, leading to that famous error.

Interesting possibility.  Is there anything unusual about the interface, or about the method being looked up, or about the class that  eventually implements it?

> Is this known?

This is new information, to me at least.

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20130125/5e7c3cff/attachment.html 


More information about the mlvm-dev mailing list