Bug 65740 - class loading issues?
Summary: class loading issues?
Status: RESOLVED INVALID
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 1.2.1   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-04 12:07 EDT by roberto dorich CLA
Modified: 2004-10-21 04:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roberto dorich CLA 2004-06-04 12:07:39 EDT
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
Comment 1 roberto dorich CLA 2004-06-04 13:02:38 EDT
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.
Comment 2 Andrew Clement CLA 2004-08-06 05:33:38 EDT
I like bugs where the users resolve them for themselves :)
Comment 3 Adrian Colyer CLA 2004-10-21 04:30:58 EDT
Fix released as part of AspectJ 1.2.1