Community
Participate
Working Groups
Eclipse 3.1, AJDT 1.3.0.20050824175147 Platform linux fedora core 4; java jvm 1.5.0-rc-b63 Aspect file and stack trace from .metadata/.log to be attached. On save operation (ui click on floppy icon) on the following aspect after a modification (e.g, a new line), a dialog appears stating that an ArrayIndexOutOfBoundsException had occurred. Apparently, the compile exits because when running a clean build, no class file is created.
Created attachment 26438 [details] aspect file: TransactionManager
Created attachment 26439 [details] stacktrace from eclipse's .metadata/.log
Created attachment 26461 [details] output from ajc 1.5.0 M3 Exception occurs in ajc 1.5.0 M3. So, this appears to NOT be an ajdt problem. Assumed this was an ajdt plugin problem and decided to run ajc standalone. The eclipse plugin can be configured to NOT weave. Such I did and rebuilt the project leaving me with clean class files, I hope. I ran ajc manually on said class files, instead of from within eclipse. I ran it with -inpath <build directory path> argument. The same exception is thrown. I will also attach the java source file from the application that caused the trouble. In case it matters: please note I used the javax.ejb.TransactionAttribute from glassfish 9.0-b09.
Created attachment 26466 [details] all files, command line run as jar file Here are all the files necessary to recreate this problem except for the non-redistributable j2ee from glassfish which contains the definition of javax.ejb.TransactionAttribute. Also included are the unix shell script used to run ajc, the java file list (only one file) and the acore-.....txt file dumped by ajc.
Passing over to AspectJ
I think I now understand what's going on here. I'm marking as M4 for resolution, will try and take a peek early next week. The after throwing form should take a formal, not a type name - that's what i failed to spot last time i looked at this, so: @AfterThrowing(pointcut="transactedMethod()", throwing="java.lang.RuntimeException") public void failedTransaction() { System.out.println("failed transaction"); } should be: @AfterThrowing(pointcut="transactedMethod()", throwing="rtEx") public void failedTransaction(RuntimeException rtEx) { System.out.println("failed transaction"); } but we don't handle the error very gracefully at all.
Thanks, The edit you suggest has allowed me to continue.
The cause of this bug is the same as bug 107953, and should be fixed by the same patch that I applied to fix that bug. Closing this off as a duplicate, any further work by Alex will be tracked under 107953. Thanks, Adrian. *** This bug has been marked as a duplicate of 107953 ***