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 has not beenapplied [Xlint:adviceDidNotMatch]

if i change
 
call (* TaskManagementService.addTask(..))
 
to
 
call (* *.addTask(..))
 
it works
 
----- Original Message -----
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