Community
Participate
Working Groups
Hi, I';m using aspect-j in a J2EE environment running many interoperating applications (under WL8.1). The setup I have is this: Under application Core: com.il.webservices.service.MyService Under application OldWS: com.il.webservices.service.MyService I run ajc on both packages for similar reasons (as you can see, same full qualified name, different apps) they both use the same aspectj.jar file The problem is that when I run the OldWS.MyService.x() is called, I get the following error: <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java. lang.NoSuchMethodError: com.i ntralinks.webservices.services.ValidationAspect.ajc$before$com_intralinks_webse rvices_services_ValidationAspect$308(Lorg/aspectj/lang /JoinPoint;)V at com.intralinks.webservices.services.SessionService.userLogon (SessionService.java) at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) I think that the crux of the problem is that under both packages, a ValidationAspect.class is created and this is generating the issues. WL uses different (or rather a tree) of class loaders, and I have a hunch that the JoinPoint class has been loaded from the Core app but the ValidationAspect from the OldWS app (or viceversa). Have you ever seen this problem? What's the easiest fix? Is there a way to tell ajc to use a different name? Thanks - Roberto platform : WinXP - P4 & Sun : Weblogic 8.1 Aspect-j manifest: Manifest-Version: 1.0 Name: org/aspectj/lang/ Specification-Title: AspectJ Runtime Classes Specification-Version: 1.1.1 Specification-Vendor: aspectj.org Implementation-Title: org.aspectj.tools Implementation-Version: 1.1.1 Implementation-Vendor: aspectj.org
Renaming... I've since figured out that the ValidationAspect.class generated is simply the name of the ValuidationAspect.aj file that I had created. I renamed this to ValidationAspect_old.aj and it now works like a charm.
I like bugs where the users resolve them for themselves :)
Fix released as part of AspectJ 1.2.1