eclipse-aspectj / aspectj

Other
303 stars 86 forks source link

LTW sometimes does not work with jboss-modules class loader and around advice #279

Closed urisimchoni closed 9 months ago

urisimchoni commented 9 months ago

When trying to apply LTW to DataSource classes on WildFly application server, we see that sometimes weaving silently fails. The two "ingredients" for this to happen appear to be:

Enabling debugging and weaveInfo shows that the advice is applied, yet the actual advice code does not run, as if weaving did not occur.

After some digging, the root cause appears to be as follows:

Tested on versions 29 and 30 with several Java-17 distributions on Linux.

A reproducer project with a mock class loader can be found here: https://gitlab.com/urisimchoni/aspectj-parallel-issue