Re: about NoClassDefFoundErrors
Am 25.01.2013 22:51, schrieb John Rose: > 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? actually I have to withdraw partially. The method does exist. I was only so happy to get around the error that I did not check carefully. But the whole thing still is fishy - and maybe it is even a bug in jdk7 and one in jdk8 Both lookup-problems where about a Lookup#findVirtual on an interface that extends an interface and the method is defined in the parent interface. So for example there is https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/vmplugin/v7/IndyGuardsFiltersAndSignatures.java#L91 looking for the method invokestatic on Metaclass which is https://github.com/groovy/groovy-core/blob/master/src/main/groovy/lang/MetaClass.java and doesn't define the method on its own. Intead it is defined in MetaObjectProtocol which has the method here https://github.com/groovy/groovy-core/blob/master/src/main/groovy/lang/MetaObjectProtocol.java#L176 and is the parent interface. The other case is about GroovyInterceptable extending GroovyObject and the invokeMethod method. In jdk8 the above mentioned IndyGuardsFiltersAndSignatures.java line 91 failes, where jdk7 does not, but then jdk7 has these NoClassDefFoundError problems, that vannish after fising this. Imho findVirtual should not fail for the lookup on the childinterface, which is why I consider that a bug in jdk8 at least... but maybe that one is known. bye Jochen ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: about NoClassDefFoundErrors
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___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
about NoClassDefFoundErrors
Hi all, 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 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. Is this known? bye Jochen -- Jochen "blackdrag" Theodorou - Groovy Project Tech Lead blog: http://blackdragsview.blogspot.com/ german groovy discussion newsgroup: de.comp.lang.misc For Groovy programming sources visit http://groovy-lang.org ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev