Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ERROR: ... must be declared in an aop.xml file

If you compile an aspect that advises itself, the resulting class file on disk will be woven. If this .class file is then used as input to the LTW process (loaded by the JVM when an LTW agent is defined), you get the error that you are seeing unless the aspect is defined in aop.xml.  Changing the aspect definition to not advise itself (&& !within(MultiFactoryBeanConfigurerSupportFactoryAdder)) would be one way around this. The evil -XnoWeave used to be another option, but we took that away because it was, well, evil ;).

Regards, Adrian.

On 18/05/06, Barry Kaplan <groups1@xxxxxxxxxxx> wrote:
Could this be the case if I /only/ use LTW? That is, I have all weaving turned off in eclipse.

-barry

Adrian Colyer wrote:
If a type is loaded that has previously been woven with an aspect, AspectJ expects that aspect to be availalbe at LTW time so that the correct semantics can be preserved when potentially (re)weaving that  type with additional aspects.

It's also entirely possible for an aspect to advise join points that are within itself, so it could be that something in your application is causing these types to be loaded, the weaver then sees that they were previously woven with an aspect (that happens to be the same type in this case), and then complains because that aspect has not been defined to the load-time weaver.

On 09/05/06, Barry Kaplan <groups1@xxxxxxxxxxx > wrote:
I'm getting the below errors. These classes are /not/ declared in
aop.xml because I'm not using them right now. So what could be causing
them to get weaved? And why does they message say they are woven into
themselves?

thanks!


13:42:41,359 ERROR-AspectJWeaverLogger - aspect
'org.opentrader.infra.spring.MultiFactoryBeanConfigurerSupportFactoryAdder'
woven into
'org.opentrader.infra.spring.MultiFactoryBeanConfigurerSupportFactoryAdder '
must be declared in an aop.xml file.
[][main][org.opentrader.runtime.aspectj.AspectJWeaverLogger]
13:42:41,890 ERROR-AspectJWeaverLogger - aspect
'org.opentrader.infra.myfaces.MyFacesExceptionHandlerUnLogger ' woven
into 'org.opentrader.infra.myfaces.MyFacesExceptionHandlerUnLogger' must
be declared in an aop.xml file.
[][main][org.opentrader.runtime.aspectj.AspectJWeaverLogger]

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



--
-- Adrian
adrian.colyer@xxxxxxxxx

_______________________________________________
aspectj-users mailing list


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users





--
-- Adrian
adrian.colyer@xxxxxxxxx

Back to the top