DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24964>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24964 broken SlideRepository <-> SlideSourceFactory / SlidePrincipalProvider ------- Additional Comments From [EMAIL PROTECTED] 2003-11-26 01:03 ------- No, actually this is the problem I experienced in my explaination part I. Maybe i should have made that part II or posted 2 bugs ;) The problem basically comes about because when the SlideRepository component is looked up from the manager it is wrapped in a proxy o.a.avalon.framework.component.ComponentProxyGenerator$ComponentInvocationHandler. The proxy class can only be made to advertise interfaces and not methods specific to an implmentation. I am unsure if this is a desirable effect or not as far as avalon-ish concepts go (I'm not expert with this), as it seems to enforce modularity and compatability of components implementing the same role. OTOH Maybe it's just there so the object can be marked as a Component? Regardless, because the Repository interface has no method declarations, both SlideSourceFactory and SlidePrincipalProvider need to cast it to a SlideRepository to obtain the NamespaceAccessToken (see SlideSourceFactory.getSource() and SlidePrincipalProvider.initialize()). The NPE you're seeing is because in SlidePrincipalProvider.initialize() this code here: if ( !(repository instanceof SlideRepository)) { getLogger().error("Can't get Slide repository"); return; } prevents members from being initialized further down, which are subsequently accessed when the PrincipalListGenerator calls getPrincipals() on the provider. I hope this isn't too long winded to explain. Like I said earlier though, I am unsure as to how this is best solved. I "cheated" to make it work for myself by adding the get*NamespaceAccessToken() methods the Repository interface and removing the instanceof & casting code from the SlideSourceFactory and SlidePrincipalProvider.
