Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] [warning] advice defined in Logger hasnotbeenapplied [Xlint:adviceDidNotMatch]

excuse me what does it mean "fully qualify it in the aspect definition"?

imported within the aspect it is already...

thanks, Roland

----- Original Message ----- From: "Ron DiFrango" <rdifrango@xxxxxxxxxxxxxxxxxxx> To: "Roland Piazzi" <roland_piazzi@xxxxxxx>; <aspectj-users@xxxxxxxxxxx>; <aspectj-users@xxxxxxxxxxx>
Sent: Thursday, September 20, 2007 9:45 PM
Subject: RE: [aspectj-users] [warning] advice defined in Logger hasnotbeenapplied [Xlint:adviceDidNotMatch]


Roland,

Standard Java import/packaging rules apply to aspects as well. So either you need to import the full qualified class TaskManagementService or fully qualify it in the aspect definition.

Ron DiFrango
Architect/Lead Consultant
Cap Tech Ventures, Inc
Cell: 804-855-9196
Work: 804-545-8742



-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx on behalf of Roland Piazzi
Sent: Thu 9/20/2007 2:03 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] [warning] advice defined in Logger hasnotbeenapplied [Xlint:adviceDidNotMatch]


 ----- Original Message -----
 From: Roland Piazzi
 To: Ron Bodkin
 Sent: Thursday, September 20, 2007 7:38 PM
Subject: Re: [aspectj-users] [warning] advice defined in Logger has notbeenapplied [Xlint:adviceDidNotMatch]


 no its defined in TaskManagementService I'm sure.

 but i would have another question:

how can i link different packages at compile time? Because my TaskManagementService
 is in a different package than the aspect, i mean how can i make:
ajc -showWeaveInfo show me something, because when I write ajc -showWeaveInfo in each package there is no output.


   ----- Original Message -----
   From: Ron Bodkin
   To: 'Roland Piazzi' ; aspectj-users@xxxxxxxxxxx
   Sent: Thursday, September 20, 2007 7:04 PM
Subject: RE: [aspectj-users] [warning] advice defined in Logger has notbeenapplied [Xlint:adviceDidNotMatch]


I'd guess that addTask isn't declared on TaskManagementService (e.g., is it an implementation method), or that you are statically calling a different method (e.g., a superclass). Can you summarize the type hierarchy, where addTask is declared, and how it is called?




----------------------------------------------------------------------------

From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Roland Piazzi
   Sent: Thursday, September 20, 2007 8:00 AM
   To: Roland Piazzi; aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] [warning] advice defined in Logger has notbeenapplied [Xlint:adviceDidNotMatch]



   if i change



   call (* TaskManagementService.addTask(..))



   to



   call (* *.addTask(..))



   it works



     ----- Original Message -----

     From: Roland Piazzi

     To: aspectj-users@xxxxxxxxxxx

     Sent: Thursday, September 20, 2007 4:28 PM

Subject: [aspectj-users] [warning] advice defined in Logger has not beenapplied [Xlint:adviceDidNotMatch]



     Hi!



I try to compile my classes and aspects with the -showWeaveInfo option and it gives me the following warning:



[warning] advice defined in Logger has not been applied [Xlint:adviceDidNotMatch]



     My Aspect looks like this:



     public aspect Logger {



     pointcut loggingAddTask(Task task):

         call (* TaskManagementService.addTask(..)) &&

         args(task) &&

         !within(Logger);



     after(Task task) returning: loggingAddTask(task) {

             System.out.println("Hello");

             System.out.println("TaskId:"+task.getId());

             JAXBContext jc;

             try {

                 jc = JAXBContext.newInstance("jaxbclasses");

                 Marshaller mars= jc.createMarshaller();

                 ObjectFactory objFactory= new ObjectFactory();

                 Log log= objFactory.createLog();

                 AddTaskElement addTask = log.getAddTask();

                 addTask.setID(task.getId());

                 try {

mars.marshal(log, new FileOutputStream("C:\\studium\\diplomarbeit\\testjaxb\\log.xml"));

                 } catch (FileNotFoundException e) {

                         e.printStackTrace();

                 }

             } catch (JAXBException e) {

                     e.printStackTrace();

             }

     }



I've already searched in the list, and also found something like this, but did not help.

     Can anyone help me please?

     Thanks, Roland


--------------------------------------------------------------------------

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


Back to the top