Re: [aspectwerkz-user] aspectwerkz , ant and junit

Colin Taylor <[email protected]> Wed, 23 Nov 2005 21:18:52 +1300
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
Yep that was it Mattias. Thanks for that. Confuses me why that would be the
case though...
Annoying side affect is I cant debug my junit-tests in the debugger (which
wants fork=false).

On 11/23/05, Mattias Jiderhamn <[email protected]> wrote:
>
> At 2005-11-23 06:10, you wrote:
> >Hi there, having a bit of bit somewhere between ant, junit, and
> aspectwerkz.
> >
> >I making a dynamic proxy with makeProxyAdvisable set to true but for
> >some reason this fails in my units tests .. ie. I get a
> ClassCastException
> >
> >So :
> >
> >1.        Object proxy = Proxy.newInstance(classToProxy, false,
> >true);  // not an instanceof Advisable
> >
> >2.        ((Advisable) proxy).aw_addAdvice(ASYNCHABLE_METHOD,new
> >SchedulingAdvice(this, schedule, serviceClass)); // ClassCastException.
> >
> >Presumably
> >
> >Does anyone have any suggestions? I guess I could mock out
> >Aspectwerkz with JMock but seems like a tricky hassle.  Is that how
> >these things are normally done ?
> >
> >
> >cheers for any help
> >Colin.
>
> Try to execute the JUnit tests with fork="true", since this *might*
> be a classloader issue.
>
>    /Mattias Jiderhamn
>
>