Community
Participate
Working Groups
Hi. I am weaving two aspects into a jar file "jar-to-jar". ajc 1.5.0 gives me a huge error message (see attachement). Would be great if I could get any recommendations on this. Thanks! Eric
Created attachment 33558 [details] the output generated by ajc first 4 lines might be caused by the javac compilation that happens before and builds the jar (not to confuse you)
Created attachment 33559 [details] the jar I weave into
Comment on attachment 33559 [details] the jar I weave into I will replace this...
Created attachment 33560 [details] this contains the jar I weave into and all dependencies (I hope)
The commandline I use: ajc -sourceroots "/home/user/ebodde/bin/sabs/install/benchmarks/Java/jlo-rt/aspects:/home/user/ebodde/bin/sabs/install/benchmarks/Java/jlo-rt/perf-tests" -classpath "/home/user/ebodde/bin/sabs/install/benchmarks/Java/jlo-rt/util/jasminclasses-2.2.2.jar:${CLASSPATH}:/home/user/ebodde/bin/sabs/local/system/temp/Java/jlo-rt/jlo-rt.jar:/home/user/ebodde/bin/sabs/install/benchmarks/Java/jlo-rt/lib/junit.jar:/home/user/ebodde/bin/sabs/install/benchmarks/Java/jlo-rt/lib/commons-collections-3.1.jar" -injars "/home/user/ebodde/bin/sabs/local/system/temp/Java/jlo-rt/jlo-rt.jar" -outjar "/home/user/ebodde/bin/sabs/local/system/temp/Java/jlo-rt/jlo-rt-instr.jar" So - last mail for today. I promise :-)
Created attachment 33566 [details] still found this aj core dump
It appears java.util.Collection is coming into the system as a 'simple' type - neither in its generic form or raw form - so it gets put into the typemap as a simple type. this gets us horribly confused later when we are working with a subclass of it that treats it as raw. (thanks for the code - I was able to recreate it here...)
thanks for finding that out so quickly. could you please let me know ASAP when a fix is available - we are doing some benchmarks on AJ compilers and it would be a pity ajc not being one of them. Thanks!
do you have to use a 1.5 VM for this? If you use an earlier one with a non-generic form of Collection in it, it will probably work.
or ... compile with the -1.5 flag - but I suspect that will affect performance numbers you collect as we have more type analysis to do.
Oh great, that worked! We are testing the runtime performance of the generated code, so that should be fine. I thought -1.5 would be a default option (at least if you encounter Java 5 code) ...
fix checked in for the problem. -1.5 is not default unless LTW.
build failed to upload last night, should be there a little later this morning. Anyway, the real problem here was processing code built with 1.5 when running ajc in 1.4 mode. We didn't do the right thing and attempted to create raw types rather than simple types in the weaver where the compiler had done the right thing and created simple types. Basically the fix was to put a check in our weaver to only build raw types if the system was running in 1.5 mode.
fix available.