We have few aspects, Aspect classes are defined with @Aspect and declared the same aspect in METAINFO/aop.xml:
aop.xml
<aspectj>
<weaver options="-Xset:weaveJavaxPackages=true">
<include within = "Test"/>
</weaver>
<aspects>
<aspect name = "Test"/>
</aspects>
</aspectj>
Below error is thrown only in IBM JDK environment with WebSphere.
Exception:
Error at Test.java::0 class {0} is already woven and has not been built in reweavable mode [Xlint:nonReweavableTypeEncountered]
The same code works with Tomcat + Oracle JDK stack combination.
As per AspectJ Configuration.
Aspect does not require to add it to the Weaver tag, which was causing error to thrown in SystemOut.log of WAS.
An aop.xml file contains two key sections: "aspects" defines one or more aspects to the weaver and controls which aspects are to be used in the weaving process; "weaver" defines weaver options and which types should be woven.
https://www.eclipse.org/aspectj/doc/next/devguide/ltw-configuration.html