geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <dsundst...@gluecode.com>
Subject Re: Build Failure - org/apache/geronimo/deployment/service/GBeanAdapter
Date Mon, 10 Jan 2005 18:24:03 GMT
On Jan 10, 2005, at 5:11 AM, anita kulshreshtha wrote:

>    Let me rephrase this question. Is getDeclaredMethod
> supposed to behave like this? Why is it trying to find
> GBeanAdaptor class. Shouldn't it give
> NoSuchMethodException? In that case the build will
> fail gracefully indicating that it is time to build
> openejb! I hope my question is not out of scope of
> Geronimo.

Yes this is expected. Normally when a class, is loaded in Java it is 
not fully resolved.  This means that the byte code was loaded and 
verified, but not all classes the loaded class depends on were loaded.  
This is an optimization by the VM engineers to even out load time of an 
application.  When you call getDeclatedMethod, the class is fully 
resolved, which mean that all dependency classes are loaded and this 
can cause a NoClassDefFoundError.

In this case this is caused by an inconsistent build which is a very 
abnormal case, so IMO not beneficial to add such a check to the code as 
it complicates the code.  If this could happen in an official release 
(even if it were rare), I would support adding a check.

-dain


Mime
View raw message