Community
Participate
Working Groups
Build Identifier: SpringSource Tool Suite Version: 2.5.2.RELEASE Build Id: 201101081000 I have a dependencies on my project on other libraries using aspectj and compiled with aspectj 1.6.7 when compiling my project with aspectj 1.6.11 the following error appears java.lang.NegativeArraySizeException at org.aspectj.weaver.patterns.TypePatternList.read(TypePatternList.java:490) at org.aspectj.weaver.patterns.ThrowsPattern.read(ThrowsPattern.java:120) at org.aspectj.weaver.patterns.SignaturePattern.read(SignaturePattern.java:913) at org.aspectj.weaver.patterns.KindedPointcut.read(KindedPointcut.java:335) at org.aspectj.weaver.patterns.Pointcut.read(Pointcut.java:279) at org.aspectj.weaver.patterns ... ildJob.run(AJBuildJob.java:43) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NegativeArraySizeException thrown: null Reproducible: Always Steps to Reproduce: 1. have some aspects compiled with 1.6.7 2. add jar file containing the compiled aspects to the class path of a new project using aspectj 1.6.11 3. build the new project 4. the error message will appear
another exception appears after that as following: org.aspectj.weaver.BCException at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:139) at org.aspectj.weaver.bcel.Utility.readAjAttributes(Utility.java:101) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java:185) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:91) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectType.java:289) at org.aspectj.weaver.ReferenceType.getDeclaredM ... ram Files\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar;D:\springsource2.5.2\sts-2.5.2.RELEASE\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar;
Hmmm, AspectJ 1.6.7 shouldn't really be used. 1.6.8 came out a couple of days after it due to it having a few serious issues. Are you able to recompile the libraries with 1.6.8 and tell me if it makes any difference?
(In reply to comment #2) > Hmmm, AspectJ 1.6.7 shouldn't really be used. 1.6.8 came out a couple of days > after it due to it having a few serious issues. Are you able to recompile the > libraries with 1.6.8 and tell me if it makes any difference? Compiled the aspects with 1.6.10 and tried to run it with 1.6.11 but still getting the following exception org.aspectj.weaver.BCException at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:139) at org.aspectj.weaver.bcel.Utility.readAjAttributes(Utility.java:101) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java:185) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:91) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectType.java:289) at org.aspectj.weaver.ReferenceType.getDeclaredM ... ram Files\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar;D:\springsource2.5.2\sts-2.5.2.RELEASE\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar;
Are you possibly able to share the aspects with me (compiled form would be fine) - so that I can debug this. It is pretty serious. Also, I would be interested if you could run it with 1.6.10 after compiling it with 1.6.10.
oh, just want to check there isn't any other bytecode transformation going on is there? Between when it is compiled and when it is being used?
(In reply to comment #5) > oh, just want to check there isn't any other bytecode transformation going on > is there? Between when it is compiled and when it is being used? unfortunately I will not be able to share the code, the sequence of operation is java compilation the aspectj weaving no more transformaiton, but I noticed something that may help the exception message has changed to Compile error: BCException thrown: malformed org.aspectj.weaver.EffectiveSignature attribute (length:141)java.io.EOFException
although the error has changed, both errors have the same root cause - the serialized form of some AspectJ data structure, which is stored in the classfile, is wrong. Unfortunately there are a lot of these structures, and without a failing example, it'll be tricky to address. A failing sample should probably just consist of an aspect similar to what you have - using the same pointcuts but empty advice. If you are able to come up with a small failing aspect, I'd be able to fix this pretty quickly, otherwise I'll just have to keep digging.
Under bug 335682 I may have solved this problem. Please grab an AJDT dev build and try it out http://download.eclipse.org/tools/ajdt/36/dev/update
believed fixed, please let me know if still a problem with the latest builds.