Summary: | AspectJ compiler error when weaving spring.jar version 1.2.4 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Jim Fontana <jim.fontana> | ||||
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> | ||||
Status: | RESOLVED WORKSFORME | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | aclement, tom.duffey | ||||
Version: | 1.5.0 | ||||||
Target Milestone: | 1.6.2 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Jim Fontana
2006-01-31 15:27:01 EST
Created attachment 33884 [details]
ajcore file
The JVM it fails with is 1.4.2. It does work, however, with JVM 1.5.0. There are multiple exceptions in the trace. The first exception is: java.lang.IllegalStateException: Expecting raw type org.aspectj.weaver.TypeFactory.createParameterizedType(TypeFactory.java:42) org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:82) which I *think* I fixed recently for another bug. The other exceptions are: java.lang.RuntimeException: Can't find type java.lang.annotation.Annotation org.aspectj.weaver.World.handleRequiredMissingTypeDuringResolution(World.java:241) org.aspectj.weaver.World.resolve(World.java:219) java.lang.RuntimeException: Can't find type org.hibernate.usertype.UserType org.aspectj.weaver.World.handleRequiredMissingTypeDuringResolution(World.java:241) org.aspectj.weaver.World.resolve(World.java:219) java.lang.RuntimeException: Can't find type net.sf.cglib.proxy.MethodInterceptor org.aspectj.weaver.World.handleRequiredMissingTypeDuringResolution(World.java:241) org.aspectj.weaver.World.resolve(World.java:219) java.lang.RuntimeException: Can't find type java.lang.Enum org.aspectj.weaver.World.handleRequiredMissingTypeDuringResolution(World.java:241) org.aspectj.weaver.World.resolve(World.java:219) It looks like some elements of spring 1.2.4 contain Java5 code - perhaps they aren't utilised if spring is executed on a 1.4 VM but they are still in the jar. So if we try and weave the entire jar on a 1.4 vm we still attempt to resolve the dependencies for these 1.5 related entities. I'll probably have to leave Adrian to explore it further... During 1.5.1a/1.5.2 development I fixed numerous cases of "Expecting raw type" - have you tried weaving spring with a more recent AspectJ? The 'cantFindType' xlint option can currently be set to 'ignore' for skipping errors about missing types if you *know* that the code for which the types cannot be found will not be executed. cantfindtype may get deprecated shortly though, replaced with a more robust mechanism. I currently get errors weaving spring.jar w/Spring 2.0.4, JDK 1.5 and both AspectJ 1.5.3a and the latest dev build: [iajc] -- (ClassCastException) org.aspectj.weaver.MissingResolvedTypeWithKnownSignature [iajc] org.aspectj.weaver.MissingResolvedTypeWithKnownSignature [iajc] java.lang.ClassCastException: org.aspectj.weaver.MissingResolvedTypeWithKnownSignature [iajc] at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.typeArgument2TypeX(BcelGenericSignatureToTypeXConverter.java:187) [iajc] at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:94) [iajc] at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.fieldTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:131) [iajc] at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.typeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:217) [iajc] at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.typeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:202) [iajc] at org.aspectj.weaver.bcel.BcelMethod.unpackGenericSignature(BcelMethod.java:365) [iajc] at org.aspectj.weaver.bcel.BcelMethod.getGenericParameterTypes(BcelMethod.java:312) etc. Let me know if there is anything I can provide to help but I think you can reproduce it simply by trying to weave the latest spring.jar. diagnose in 1.5.4 timeframe is this still happening... ? still unable to recreate this. Will probably need details of the aspect being used to proceed. please reopen if still a problem for you, I know 1.2.4 is a while ago... |