[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problem with load-time weaving

>That should work. The debugger aspect will weave into the code coming
>from the classpath *and put the woven code in the output folder of the
>DEBUGGER project*. Maybe this latter clause is describing the problem -
>woven code is now in the debugger project, it is not in the testapp

This hint pointed me into the right direction! Thanks for your help!

Best Nikolas

Am Fr 21.08.2009 18:12 schrieb Andy Clement <andrew.clement@xxxxxxxxx>:

>Hi Nikolas,
>When setting up a project dependency like that. If you have an inpath
>dependency then code on that path will be woven and put into the output
>directory of the project expressing the dependency. If you have an
>aspectpath dependency then that is merely acting as a place to source
>aspects from, the code on that path is not woven and copied to the
>directory of the project expressing the dependency. Maybe that
>will help you understand what is wrong?
>On your specific description:
>>If I add my testapp project to the inpath (of the debugger project),
>weaving doesn't work.

>>If I add the debugger project to the aspectpath of testapp, the
>Here the debugger aspect is applied to the code in testapp, and the
>code is in the output folder of the testapp project.
>So the difference is that if using the inpath, you need to 'run' the
>debugger project as that is where the woven application will be.
>2009/8/21 Nikolas Nehmer <nnehmer@xxxxxxxxxxxxxxxxxxxx>
>>the main problem seems to be the inpath setting. If I add my testapp
>>project to the inpath (of the debugger project), weaving doesn't work.
>>If I
>>add the debugger project to the aspectpath of testapp, the weaving
>>Shouldn't it work in both ways? Any suggestions?
>>Best Nikolas
>>Nikolas Nehmer schrieb:
>>>recently I changed my complete setting and you're right, currently no
>>>aspects are woven at all during runtime. I'm using ajdt in eclispe
>>>a load-time weaving configuration. Obviously it doesn't work :-( Of
>>>there is an aop-ajc.xml file present that includes the aspect I'm
>>>trying to
>>>weave. The small example illustrated on the AJDT demo page works
>>>Currently I have no clue why the weaver doesn't work in my setting.
>>>Just to give you an impression, a short description of my setup. I'm
>>>building a debugger application startin a test application in a debug
>>>vm -
>>>both sperated in 2 Eclipse projects. Basically, the test app running
>>>debugging mode should be aspectized (maybe this is the source of the
>>>as they are running in 2 different vms?). The aspect itself is part
>>>of the
>>>debugger project.
>>>Any suggestions?
>>>Best Nikolas
>>>Andrew Eisenberg schrieb:
>>>>A few questions:
>>>>1. Have you created a correct aop,xml and is it being used at
>>>>2. Is this aspect included in your aop.xml?
>>>>3. Are you running with the correct java agent?
>>>>4. Are any aspects being woven at runtime, or are you having a
>>>>just with this aspect?
>>>>Maybe answering these questions will help solve your problem.
>>>>On Wed, Aug 19, 2009 at 9:08 AM, Nikolas
>>>>Nehmer<nnehmer@xxxxxxxxxxxxxxxxxxxx> wrote:
>>>>>Hi there,
>>>>>currently I have a problem with AJDT's load-time weaving
>>>>>Unforntunately the following pointcut is not applied:
>>>>>pointcut mainMethodCall() : execution(static void main(String []))
>>>>>!within(TestAspect) && !within(setup..*);
>>>>>For compile-time weaving the same aspect works out. Any ideas?
>>>>>Best Nikolas
>>>>>aspectj-users mailing list
>>>>aspectj-users mailing list
>>Dipl.-Inf. Nikolas Nehmer,
>>Dept. of Computer Science. University of Kaiserslautern P.O. Box 3049,
>>67653 Kaiserslautern, Germany.
>>room 36/308, phone: +49 (0) 631 - 205 2644, fax: +49 (0) 631 - 205
>>mail: nnehmer@xxxxxxxxxxxxxxxxxxxx
>>aspectj-users mailing list