If you are finding that -Dorg.aspectj.weaver.loadtime.configuration=META-INF/aop.xml is not working, that suggests classloader delegation/lookup isn’t behaving the same for you on linux as on Windows (or that your packaging process for your apps isn’t the same…). This all kind of points to the same thing if your aspects can’t be found either.
Are you packing your aspect jar into your application jars or trying to reuse them as some common library? If class loader delegation is trying to be too clever then I can only imagine you can solve it by packaging the aspects alongside the app. There is nothing especially ‘clever’ about aspects, do you find you have the same problem with general references from application code to shared library code? The model for packaging aspect jars could/should follow the same model as shared libraries on JBoss.
cheers, Andy
Hi Andy,
In linux box, -Dorg.aspectj.weaver.loadtime.configuration=META-INF/aop.xml in linux box did not work. So, I added the path containing META-INF/aop.xml in the boot classpath -Xbootclasspath/a:$JBOSS_HOME/modules/com/test/aop/main. With this effect, the LTW agent picks the aop.xml but the corresponding AOP jar containing aspects is not picked (Even I tried adding the jar in boot classpath as well).
ERROR [stderr] (main) [MethodUtil@31c88ec8] error Cannot find parent aspect for: <concrete-aspect name='com.test.it.aop.aspect.DAOOpenAspectImpl' extends='com.test.it.aop.aspect.DAOOpenAspect' perclause='percflow(readDaoPC() || writeDaoPC())'/> in aop.xml ERROR [stderr] (main) [MethodUtil@31c88ec8] error Concrete-aspect 'com.test.it.aop.aspect.DAOOpenAspectImpl' could not be registered ERROR [stderr] (main) [MethodUtil@31c88ec8] warning failure(s) registering aspects. Disabling weaver for class loader sun.reflect.misc.MethodUtil@31c88ec8
Could you please let me know whether I am configuring wrong in linux as the same setup works in windows. 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
|