It sounds like you are loading the aspects in the wrong place?
You can’t have the parent class loader define aspects where the abstract aspects come from the children. In that situation I would either be making the concrete aspects not depend on the abstract aspects or pushing the concrete aspects down to the loader that is loading the children (so the concrete aspects can see the abstract aspects).
If your system is using some kind of child first delegation strategy for class loading and the abstract aspects appear later - you can’t currently configure aspectj to wait on defining the concrete aspects until those children abstract aspects appear.
cheers, Andy
Many thanks for the response.. Andy. org.aspectj.weaver.loadtime.configuration VM argument is working fine and earlier, I missed adding file: protocol with the VM argument to access a file that is not exposed to classpath.
-Dorg.aspectj.weaver.loadtime.configuration=file:D:\workspace\test_aop.xml
I am running my application in Wildfly 8.2.0 application server and when I start the server, I am getting the below error mentioning cannot create concrete aspect.
2015-06-23 15:09:05,092 ERROR [stderr] (main) [ModuleClassLoader@871b75] error Cannot find parent aspect for: <concrete-aspect name='com.app.it.aspect.DAOAspectImpl' extends='com.app.it.aspect.DAOAspect' perclause='percflow(readDaoPC() || writeDaoPC())'/> in aop.xml
2015-06-23 15:09:05,092 ERROR [stderr] (main) [ModuleClassLoader@871b75] error Concrete-aspect 'com.app.it.aspect.DAOAspectImpl' could not be registered
2015-06-23 15:09:05,092 ERROR [stderr] (main) [ModuleClassLoader@871b75] warning failure(s) registering aspects. Disabling weaver for class loader org.jboss.modules.ModuleClassLoader@871b75
I understand that weaver reads aop.xml content and it tries to load the aspect but only after deployment of the application during the server start up, the aspect abstract classes will be available. I tried to exclude weaving for org.jboss classes by adding the below entry in aop.xml but am still getting the above error.
<exclude within="org.jboss..*"/>
I tried the a similar thing in a java standalone application and same error appears. Could you please help me about why the above error appears and how to avoid the same. This is just to avoid ERRORS during the server start up and application deployment. Many thanks. Sridhar Thiyagarajan
_______________________________________________ aspectj-dev mailing list aspectj-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/aspectj-dev
|