Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Load Time Weaving from Eclipse-JUnit not working

I guess you followed some of the debugging techniques from that blog post of mine?  With the weaver debugging turned on could you see it was loading aspects and trying to apply them to types, or is it not even doing that?

cheers,
Andy


On 16 May 2013 03:06, Sojan Mathew <sojanmathew@xxxxxxxxx> wrote:
Hi AspectJ Community Members,

I'm using Aspects with JUnit tests in Eclipse. AspectJ is used to mock external dependency on actual production run time environment.
(In production code, I'm using lib that has native methods. In JUnit Tests, I'm "mocking" the native methods in this lib using AspectJ).
However, Aspects are not executed as expected, instead original native method is called, and throwing "UnsatisfiedLinkError".
Note: In Eclipse "Run Conguration" I specified  -javaagent:D:\Tools\aspectj1.7\lib\aspectjweaver.jar for my Junit Test.

I googled and refered few websites on "LoadTimeWeaving configuration".

How to debug this issue and proceed?

AJDT Version: 2.2.0.e37x-RELEASE-20120704-0900
AspectJ version: 1.7.0.20120703164200
Eclipse version Indigo-SR1 (3.7)

Note : Concept of "Virtual Mocks" using AspectJ influenced me (http://xprogramming.com/articles/virtualmockobjects/  http://www.onjava.com/lpt/a/4526 ).
Today we use EasyMock/Powermock a lot, but we want to try AspectJ to make it simple.
If anybody used AspectJ for this purpose, please share your thoughts and experience.


Regards
Sojan Mathew


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



Back to the top