Community
Participate
Working Groups
--- Dump Properties --- Dump file: ajcore.20051122.152749.326.txt Dump reason: org.aspectj.weaver.BCException Dump on exception: true Dump at exit condition: abort ---- Exception Information --- org.aspectj.weaver.BCException: bad resolve of void org.apache.log4j.Category.log(java.lang.String, org.apache.log4j.Level, java.lang.Object, java.lang.Throwable) at org.aspectj.weaver.World.getModifiers(World.java:216) at org.aspectj.weaver.Member.getModifiers(Member.java:406) at org.aspectj.weaver.patterns.KindedPointcut.warnOnConfusingSig(KindedPointcut.java:109) at org.aspectj.weaver.patterns.KindedPointcut.match(KindedPointcut.java:69) at org.aspectj.weaver.patterns.OrPointcut.match(OrPointcut.java:44) at org.aspectj.weaver.patterns.AndPointcut.match(AndPointcut.java:43) at org.aspectj.weaver.patterns.AndPointcut.match(AndPointcut.java:43) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:62) at org.aspectj.weaver.Advice.match(Advice.java:91) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:1126) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:1115) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:987) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:827) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:348) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:83) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:742) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:707) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:634) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:577) at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.weave(AjCompilerAdapter.java:243) at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.afterCompiling(AjCompilerAdapter.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:383) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:680) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:168) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:102) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:109) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:291)
Could you provide some details of the aspect that you were weaving with at the time please? The compiler was trying to put out a message of the form "Did not match at join point <blah> because declaring type is XXX, use this(YYY) if match desired" if that helps you pin it down any. Thanks, Adrian.
I couldn't find the compiler message, "Did not match join point, ...." It's not in the core dump or the message I get when I run ajc. I also attached my common logging jar. My point cut basically looking at log4J logging method and does something with it. Thanks. pointcut actionLog4j(Object message): (call(void org.apache.log4j.Logger.warn(Object)) || call(void org.apache.log4j.Logger.debug(Object)) || call (void org.apache.log4j.Logger.info(Object)) || call (void org.apache.log4j.Logger.error(Object)) || call (void org.apache.log4j.Logger.fatal(Object))) && args(message); void around(Object message) : actionLog4j(message) { //do something here proceed(message); }
Created attachment 30497 [details] jar that causes compiler crash
I didn't reproduce exactly the same failure as you are seeing, but I did get one very similar at the same point in the code. The problem (that I am seeing) was caused by a commons-logging.jar containing code compiled against a version of log4j.jar that doesn't exactly match the one on my classpath. In particular, part of the commons-logging code (that obviously never gets executed at runtime) calls a method on a Log4j type that doesn't exist. The compiler fell over when trying to put out an error message. It now copes with the missing method. When a build comes through with this fix in I'll ask you to try again if that's ok and make sure that it solves the problem in your environment too. As an added bonus, the "cantFindType" messages that come out when you weave into commons-logging.jar (for reasons such as those described above) are by default error messages that stops you in your tracks even though in this case you could safely ignore them. I've made them into lint messages so that you can control the severity (in this case using e.g. -Xlint:ignore) and thus still get useful results in the absence of missing types.
build now available from the aspectj downloads page - please could you test out this fix in your environment and let me know what happens? Thanks, A.
I'm moving this to "fixed" as I'm pretty confident that the changes we put in should have resolved this issue. However, if you do find that there is still an issue in the latest builds please reopen this report. Thanks, Adrian.