Discussion:
[aspectj-users] [warning] advice defined in Logger has not been applied [Xlint:adviceDidNotMatch]
Roland Piazzi
2007-09-20 14:28:12 UTC
Permalink
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
Roland Piazzi
2007-09-20 14:59:30 UTC
Permalink
if i change

call (* TaskManagementService.addTask(..))

to

call (* *.addTask(..))

it works

----- Original Message -----
From: Roland Piazzi
To: aspectj-***@eclipse.org
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
Ron Bodkin
2007-09-20 17:04:47 UTC
Permalink
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-***@eclipse.org
[mailto:aspectj-users-***@eclipse.org] On Behalf Of Roland Piazzi
Sent: Thursday, September 20, 2007 8:00 AM
To: Roland Piazzi; aspectj-***@eclipse.org
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 <mailto:***@gmx.net>

To: aspectj-***@eclipse.org

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


_____
Roland Piazzi
2007-09-20 18:03:43 UTC
Permalink
----- 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-***@eclipse.org
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-***@eclipse.org [mailto:aspectj-users-***@eclipse.org] On Behalf Of Roland Piazzi
Sent: Thursday, September 20, 2007 8:00 AM
To: Roland Piazzi; aspectj-***@eclipse.org
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-***@eclipse.org

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-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Ron DiFrango
2007-09-20 19:45:23 UTC
Permalink
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-***@eclipse.org on behalf of Roland Piazzi
Sent: Thu 9/20/2007 2:03 PM
To: aspectj-***@eclipse.org
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-***@eclipse.org
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-***@eclipse.org [mailto:aspectj-users-***@eclipse.org] On Behalf Of Roland Piazzi
Sent: Thursday, September 20, 2007 8:00 AM
To: Roland Piazzi; aspectj-***@eclipse.org
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-***@eclipse.org

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-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Roland Piazzi
2007-09-20 20:01:34 UTC
Permalink
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" <***@captechventures.com>
To: "Roland Piazzi" <***@gmx.net>; <aspectj-***@eclipse.org>;
<aspectj-***@eclipse.org>
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-***@eclipse.org on behalf of Roland Piazzi
Sent: Thu 9/20/2007 2:03 PM
To: aspectj-***@eclipse.org
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-***@eclipse.org
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-***@eclipse.org
[mailto:aspectj-users-***@eclipse.org] On Behalf Of Roland Piazzi
Sent: Thursday, September 20, 2007 8:00 AM
To: Roland Piazzi; aspectj-***@eclipse.org
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-***@eclipse.org

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-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Ron Bodkin
2007-09-20 22:12:02 UTC
Permalink
Can you send an example of the problem?

-----Original Message-----
From: aspectj-users-***@eclipse.org
[mailto:aspectj-users-***@eclipse.org] On Behalf Of Roland Piazzi
Sent: Thursday, September 20, 2007 1:02 PM
To: Ron DiFrango; aspectj-***@eclipse.org
Subject: Re: [aspectj-users] [warning] advice defined in
Loggerhasnotbeenapplied [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" <***@captechventures.com>
To: "Roland Piazzi" <***@gmx.net>; <aspectj-***@eclipse.org>;
<aspectj-***@eclipse.org>
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-***@eclipse.org on behalf of Roland Piazzi
Sent: Thu 9/20/2007 2:03 PM
To: aspectj-***@eclipse.org
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-***@eclipse.org
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-***@eclipse.org
[mailto:aspectj-users-***@eclipse.org] On Behalf Of Roland Piazzi
Sent: Thursday, September 20, 2007 8:00 AM
To: Roland Piazzi; aspectj-***@eclipse.org
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-***@eclipse.org

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-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Roland Piazzi
2007-09-21 06:03:57 UTC
Permalink
ok:

package p2;

import p1.Test;


public aspect Logger {


pointcut logging(String test):

call (* *.*(..)) &&

args(test) &&

!within(Logger);


after(String test) returning: logging(test) {

System.out.println(test);

}

}



package p1;


public class Test {


public static void main(String[] args) {

Test test = new Test();

test.test1("Hello World");

}


public void test1(String test) {

System.out.println(test);

}


}



when i test it in eclipse its ok, but how do i from the command line?

----- Original Message -----
From: "Ron Bodkin" <***@newaspects.com>
To: <aspectj-***@eclipse.org>
Sent: Friday, September 21, 2007 12:12 AM
Subject: RE: [aspectj-users] [warning] advice defined
inLoggerhasnotbeenapplied [Xlint:adviceDidNotMatch]
Post by Ron Bodkin
Can you send an example of the problem?
-----Original Message-----
Sent: Thursday, September 20, 2007 1:02 PM
Subject: Re: [aspectj-users] [warning] advice defined in
Loggerhasnotbeenapplied [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 -----
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-----
Sent: Thu 9/20/2007 2:03 PM
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.
how can i link different packages at compile time? Because my
TaskManagementService
ajc -showWeaveInfo show me something, because when I write
ajc -showWeaveInfo in each package there is no output.
----- Original Message -----
From: Ron Bodkin
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?
----------------------------------------------------------------------------
Sent: Thursday, September 20, 2007 8:00 AM
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
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
[warning] advice defined in Logger has not been applied
[Xlint:adviceDidNotMatch]
public aspect Logger {
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
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Loading...