Community
Participate
Working Groups
Build Identifier: 20100218-1602 When running a Main class that uses aspects/helper classes in a different package, java.lang.IllegalAccessError is thrown. It doesn't happen when the same aspects/helper classes reside in the package where the Main class is. This started to happen when I moved from jdk1.5.0_08 (where it worked for years) to jdk1.6.0_18. Reproducible: Always Steps to Reproduce: 1. Import the project from aop-illegal-access-error.zip. 2. Running error.composite.Main throws java.lang.IllegalAccessError. 3. Running no_error.composite.Main doesn't.
Created attachment 162782 [details] An Eclipse project with aspects/classes that reproduce the error.
I just imported the project and ran the error.composite.Main - got: ====== Demonstrating the Composite design pattern (Java version)... <<< Sample AOP implementation of Composite pattern >>> Creating Composite structure... done. This is the Structure: Directory: Directory1 File: File1 (123 KB) Directory: Directory2 File: File2 (4556 KB) File: File3 (16 KB) Calling printStructure(PrintStream) on Composition.Components... <Composite>Directory: Directory1 <Leaf>File: File1 (123 KB) <Composite>Directory: Directory2 <Leaf>File: File2 (4556 KB) <Leaf>File: File3 (16 KB) ...done. Calling subSum(): on the structure... The total size of the file system is: 4695 ...done. <<< Test completed >>> public java.lang.String error.composite.Directory.toString() public void error.composite.Directory.printStructure(java.io.PrintStream) public int error.composite.Directory.subSum() public java.lang.String error.composite.File.toString() public int error.composite.File.getSize() public void error.composite.File.printStructure(java.io.PrintStream) public int error.composite.File.subSum() ...done! === Is that what comes out when it works? You didn't mention what version of AJDT you were using - can you retry on the latest?
please reopen if still an issue on the latest AJDT