On Wed, 2009-02-04 at 12:46 +0200, Mircea Carasel wrote:
> Paul Mcdaid wrote:
> > I'm working on the dhcpd.conf generation and I've been stuck on a Spring
> > issue that I can't figure out.
> >
> > I need adminContext injected into the LocationsManagerImpl class.
> >
> > I've done the basic coding for this (see attached patch), but when I try
> > to load up sipXconfig I get the following nested exception error in
> > sipXconfig which ends with:
> >
> >  Cannot resolve reference to bean 'locationsManager' while setting bean
> > property 'locationsManager'; nested exception is
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'locationsManager': FactoryBean threw exception on object
> > creation; nested exception is java.lang.IllegalArgumentException: Class
> > must not be null
> >
> >
> > Mircea has looked at this patch and can't see anything obvious wrong
> > with it.
> >
> > Any help would be much appreciated!!
> >
> > Paul. 
> >   
> At a first glance I thought that this is a circular reference somewhere 
> and that can be solved with <lookup-method tag in spring (make 
> LocationManagerImpl abstract).
> But there is not any obvious circular reference - so the cause may be 
> something else. The only thing I noticed is that both LocationManager 
> and AdminContext are injected in FirstRunTask - this should not lead to 
> a circular reference problem...
> Mircea

This is more of a general comment which applies if in fact there is a
circular reference here.  I would prefer to see classes refactored to
remove circular references rather than see lookup-method used.  This is
especially true with AdminContext.  AdminContext is getting pretty full
of functionality that I believe is put there just because it lacks a
better home.  Paul and I talked about this on Friday and I believe he
was going to factor out the functionality that we were discussing at the
time.  It looks like there are some other, harder to find circular
references that also need to be handled.  I would be quite happy if we
could do away with the use of lookup-method entirely :)

Kevin


_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to