Community
Participate
Working Groups
I debugged this stack trace from load-time weaving (ajcore files are also available). I found that the signature argument to TypeFactory.createTypeFromSignature(String) is Pjava/lang/Enum<Ljavax/jws/soap/SOAPBinding$ParameterStyle;>; but the method is erroneously using an empty array of parameters, because it thinks the $ relates to the generic type, not the parameter. It should be fairly easy to reproduce with a test case and to fix with a patch - I'll look at it some more tonight or this week. java.lang.ArrayIndexOutOfBoundsException at org.aspectj.weaver.ResolvedType.getMemberParameterizationMap(ResolvedType.java:698) at org.aspectj.weaver.ReferenceType.getDeclaredInterfaces(ReferenceType.java:406) at org.aspectj.weaver.ResolvedType.getDirectSupertypes(ResolvedType.java:65) at org.aspectj.weaver.patterns.TypePattern.matchesSubtypes(TypePattern.java:182) at org.aspectj.weaver.patterns.TypePattern.matchesSubtypes(TypePattern.java:169) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:119) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.accept(ClassLoaderWeavingAdaptor.java:621) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:253) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:122) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155) at java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.security.ProtectionDomain;)Ljava.lang.Class;(Unknown Source) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang.Class;(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(Ljava.lang.String;)Ljava.lang.Class;(Unknown Source) at java.lang.ClassLoader.loadClassFromNative(Ljava.lang.String;)Ljava.lang.Class;(Unknown Source) at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source) at jrockit.reflect.MemberAccess.getClassFromFieldDesc(Ljava.lang.String;ILjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source) at jrockit.reflect.MemberAccess.getReturnClassFromMethodDesc(Ljava.lang.String;Ljava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
Created attachment 59664 [details] First stab at fixing this The tests show that the new code works better, fixing the case I encountered in a real system. But isn't PMyInterface<Ljava/lang/String;Ljava/lang/String;>$MyOtherType<Ljava/lang/Object;>; also a valid signature? I'd like to rewrite these tests to get signatures from real types, but if someone could just verify the signatures I used to see if there's an actual problem beyond the one I fixe.
patch is in, thanks Ron. that second signature looks a possible sig but I haven't time to explore with some real testcases.
anything left to do here? check for 1.5.4
*** Bug 169605 has been marked as a duplicate of this bug. ***
*** Bug 178379 has been marked as a duplicate of this bug. ***
*** Bug 180132 has been marked as a duplicate of this bug. ***
*** Bug 202938 has been marked as a duplicate of this bug. ***
The same stack trace is reported in many other bugs. Looking across all of those I don't see anyone who was using an AspectJ level after 6-Mar-2007, when the patch went in at comment 2. So I suspect this is now fixed for everyone in the development builds.
*** Bug 210032 has been marked as a duplicate of this bug. ***
no other reports of this recently - assuming fixed!
This bug is not fixed. I can reproduce every time using some code from my companies trunk. Tried version 1.5.4, 1.6.0, and both still had this problem. May 2, 2008 6:28:48 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/palantir/util/LRUWeakSoftCache$1 java.lang.ArrayIndexOutOfBoundsException: 0 at org.aspectj.weaver.ResolvedType.getMemberParameterizationMap(ResolvedType.java:695) at org.aspectj.weaver.ReferenceType.getDeclaredInterfaces(ReferenceType.java:406) at org.aspectj.weaver.ResolvedType.getDirectSupertypes(ResolvedType.java:65) at org.aspectj.weaver.ResolvedType.collectInterTypeMungers(ResolvedType.java:1156) at org.aspectj.weaver.ResolvedType.collectInterTypeMungers(ResolvedType.java:1158) at org.aspectj.weaver.ResolvedType.getInterTypeMungersIncludingSupers(ResolvedType.java:1135) at org.aspectj.weaver.ResolvedType.checkInterTypeMungers(ResolvedType.java:1202) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1588) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1563) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1341) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1161) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:353) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:260) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:55) at sun.instrument.TransformerManager.transform(TransformerManager.java:169) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Can I ask which version you used to collect that stack trace? from the top line: org.aspectj.weaver.ResolvedType.getMemberParameterizationMap(ResolvedType.java:695) 695 isnt a line that can throw that exception in 1.5.4 or 1.6.0. But line 695 in AspectJ1.5.3 can throw that exception and 1.5.3 had the bug in it. Are you absolutely sure you aren't picking up a 1.5.3 aspectj weaver from somewhere? Are you using AJDT in eclipse, if so what version?