Humm, you seem to have the same problem I got a long time ago :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=406817
the bug is still open and certainly due to the JBoss ClassLoader
strategy of the micro_kernel ( It is a OSGi like).
I have no tried to package aspectjweaver.jar + custom aspects as a
JBoss module... perhaps it is a solution ...
The thread i exchanged with Andrew Clement => https://www.mail-archive.com/aspectj-users@xxxxxxxxxxx/msg08250.html
<OT>
To do "LTW weaving like" with JBoss, i must switch to Byteman =>
http://byteman.jboss.org/
I got more weaving. But some others guys have encounted problems
also with Byteman , due to the Classloader => https://developer.jboss.org/thread/248812
I have also begun a byteman packager =>https://github.com/PASTJL/bytemanPkg
</OT>
Le 16/02/2015 05:11, Anggiat Barita a
écrit :
Hi All,
I have been using aspectj ctw successfully with my
application deployed into Jboss 7.
Due to some requirement, I need to create and apply new
aspects during LTW only but I am facing many warnings
and errors.
I have followed the steps given from https://wiki.eclipse.org/LTWJboss7
and I am using the latest 1.8.4 version of aspectj .
My humble and novice questions to all the users here are :
- Is it possible to run Jboss7 aspects the were
pre-compiled bundled within war/ear together with
different aspects in the separate JAR to be loaded
during LTW ? I have tried combination -Djboss.modules.system.pkgs
whether to include new aspect package and existing
aspect package. ( the aspect packages are different,
com.x.old.* and com.x.new.*)
- If yes, should the separate JAR need to contain all of
the aspects to run or just the new delta aspects ?
- When it's separate, i am getting the following error
msg.
- error aspect 'com.x.old.ExistingAspect' woven into
'com.x.y.ClassA' must be defined to the weaver
(placed on the aspectpath, or defined in an aop.xml
file if using LTW).
- java.lang.NoSuchFieldError: ajc$cflowStack$0 (
this seem to be because existing aspect has made use
of cflow and it's failing during ltw)
- java.lang.InstantiationError
- java.lang.NoClassDefFoundError
- Even I have the existing aspect defined within
aop.xml, the same error remains
- I even define the aspect but exclude the existing
aspects but no luck on that as well
- After this step I actually combine everything as per
below questions #3
- If not, I have re-bundled all aspects into one
separate JAR but I am facing the following errors, as if
the bundled jar files unable to resolve the classes
within war java.lang.NoSuchFieldError
java.lang.InstantiationError
java.lang.NoClassDefFoundError
I appreciate any help and advices to pass through this
problems. Sorry the long winded question, if it's not
clear please ask I can elaborate more on the errors.
Thanks & Regards,
Anggiat
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users
|