Thank Daan for your reply, but it looks like the issue is not in the test
program, but during initializing the application itself because the failing
test does not reference 'ActionEventInterceptor' class.

I have really hard time to figure this out because I just added '@Inject
private AccountDao _accountDao;' in 'ActionEventInterceptor' class and the
same injection was already included in 'ActionEventUtils' class that is in
the same package.

It is quite strange to me, so can you give me some light on this?
Thanks
Alex Ough



On Thu, Nov 28, 2013 at 4:46 AM, Daan Hoogland <daan.hoogl...@gmail.com>wrote:

> H Alex,
>
> I suppose you are no longer struggling with this but just in case;
> check which context xml is loaded in your test and make sure the
> appropriate classes are defined in that file. The tests don't
> necessarily load all the definitions.
>
> regards,
> Daan
>
> On Tue, Nov 19, 2013 at 10:38 PM, Alex Ough <alex.o...@sungard.com> wrote:
> > All,
> >
> > I'm back to Java development after quite long years, so currently I have
> > difficulty finding out what causes this error.
> >
> > Basically, I'd like use 'DomainDao/AccountDao/UserDao' and/or
> > 'AccountMgr/DomainMgr' by 'Injecting' them in
> > 'com.cloud.event.ActionEventInterceptor' class to find
> domain/account/user
> > information.
> >
> > But strangely, the injections of all of the classes except 'AccountMgr'
> > cause the above error in the unit tests ('com.cloud.vpc.Site2SiteVpnTest'
> > and 'org.apache.cloudstack.lb.ApplicationLoadBalancerTest') during
> building
> > 'Server' project.
> >
> > I'm not familiar with 'inject' tag, so I'm not sure what the problem is,
> > but just defining a variable using 'inject' tag causes the failure.
> >
> > Your help will be very appreciate.
> > Thanks
> > Alex Ough
>
>

Reply via email to