Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] nested exception is java.lang.NoSuchMethodError: common.aspects.TraceAspect.aspectOf() with WAR file via ant

Hi Maria,

The aspectOf() (and hasAspect()) method are added to all aspects when they are compiled by ajc.  Or, if you are using, annotation style these are not initially added if you use javac to compile the aspect, the aspects must be finished off by going through ajc themselves.

From your clause 'jar files containing my aspectJ annotations' I get the impression you are using annotation style, so the aspects are not being 'finished off' properly.  How are you passing them through iajc - are they on the inpath with everything else?  IIRC they wouldn't get finished off properly if only on the aspectpath.

cheers,
Andy



On 1 August 2012 21:25, Maria Lopes <Maria.Lopes@xxxxxxxxxx> wrote:

Hi,

 

I am getting the nested exception is java.lang.NoSuchMethodError: common.aspects.TraceAspect.aspectOf() error when I deploy my WAR file which is created via an ant build script

 

I use the <iajc> ant task over the jar files containing my aspectJ annotations and over the UI controller and command classes and output them into WEB-INF\classes. Then I build my war file using the <war> task.

 

But on deployment I still get the error. I have read various posts and am ensuring to build the war after the <iajc> task is run on all my jars and other java classes.

Any suggestions on how I can proceed

 

Thanks and Regards

Maria




MASTEK LTD.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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



Back to the top