Community
Participate
Working Groups
Created attachment 209786 [details] org.aspectj.weaver.World$TypeMap.demote ConcurrentModification exception Hi, Following exceptions are happen periodically then starting Eclipse with weaving enabled. The World$TypeMap.demote() related one is most annoying :-( Problem is relevant for aspectj weaver in AJDT 2.1.3 and latest dev version. If you need some additional information, please ask. Thanks, Andrey.
Created attachment 209787 [details] NPE in org.aspectj.weaver.UnresolvedType.forSignature
possibly this particular concurrentmodificationexception could be worked around by turning off type demotion in the weaver - this option in one of the aop.xml files being used: -Xset:typeDemotion=false However, that is basically a workaround for the more fundamental issue that two threads appear to be in the same weaver, which is not allowed. (the UnresolvedType NPE could be a different manifestation of this same issue - one thread hasn't yet set the signature whilst the second thread is attempting to process it).
Andy, Is this an aspectj bug?
Converting to an AspectJ bug.
the load time weaving used to modify eclipse on startup appears to be bypassing the guards that prevent two threads in the same weaver instance. I can't fix the weaver as it was just never designed to support this. To do anything here we would need to look at how the weaver is kicked off from equinox weaving and why it is skipping the classloader locks.
Created attachment 217372 [details] Exceptions at Eclipse startup I have similar problems at Eclipse startup. NullPointerException and ConcurrentModificationException in aspectj.weaver code.
It looks like you have Eclipse 3.7.2, is this right? Also, what version of AJDT are you using?
Yes, Eclipse 3.7.2.M20120208-0800. About AJDT, I'm not really sure, and I didn't find any plugin named "ajdt" or similar. I certainly didn't install it. My guess is it's a dependency of another feature. I suspect Scala IDE, because I found this plug-ins while searching for "weaving" org.eclipse.equinox.weaving.aspectj (1.0.0.v20100503) "WeavingService Plug-in (Incubation)" [Active] org.eclipse.equinox.weaving.hook (1.0.0.v20100503) "Aspect Weaving Hooks Plug-in (Incubation)" [Resolved] org.scala-ide.sdt.aspects (2.0.1.v-2_09-201204232213-dae5cd4) "Scala JDT Weaving" [Active] On the installed software list I have "JDT Weaving for Scala", a dependency of "Scala IDE for Eclipse", having this description: "This feature is necessary for the Scala IDE to function properly. It adds extension points inside the Java Development Tools through AspectJ weaving." As far as I know, everything is up to date in my installation, checking for updates doesn't find any.
Since you are using ScalaIDE, you are using an old version of JDT weaving. Use this update site: http://download.eclipse.org/tools/ajdt/37/dev/update/ And select the JDT weaving feature to install. This will likely fix your problem. Let me know.
(In reply to comment #9) Thanks, I didn't experience anymore errors since installing the update version.