Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: ConcurrentModificationExceptions with ECoreUtil.resolveAll
Re: ConcurrentModificationExceptions with ECoreUtil.resolveAll [message #588722] Wed, 14 February 2007 11:57
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Paul,

It sounds likely that this is a multi-threading issue. Certainly
ECrossReferenceAdapter is not designed for safe multi-threaded updates
and I don't think the CacheAdapter is specialized to support that
either. I didn't see your posting on the UML newsgroup, so I added it
to the "to" list.


Paul Kelly wrote:
> Hi,
>
> I get the following exception when I call ECoreUtil.resolveAll :
>
> java.util.ConcurrentModificationException: concurrent access to
> HashMap attempted by Thread[Worker-6,5,main]
> at java.util.HashMap.onExit(HashMap.java:217)
> at java.util.HashMap.transfer(HashMap.java:514)
> at java.util.HashMap.resize(HashMap.java:500)
> at java.util.HashMap.addEntry(HashMap.java:800)
> at java.util.HashMap.put(HashMap.java:441)
> at org.eclipse.uml2.common.util.CacheAdapter.put(CacheAdapter.j ava:420)
> at org.eclipse.uml2.common.util.CacheAdapter.put(CacheAdapter.j ava:393)
> at
> org.eclipse.uml2.uml.internal.impl.PropertyImpl.getDeployedE lements(PropertyImpl.java:635)
>
> at
> org.eclipse.uml2.uml.internal.impl.PropertyImpl.eIsSet(Prope rtyImpl.java:2551)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:414)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:549)
>
> at
> org.eclipse.emf.ecore.util.EcoreUtil.resolveCrossReferences( EcoreUtil.java:302)
>
> at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.ja va:296)
>
> Just wondering if anyone else has come across this issue?
> I wasn't sure whether to post to the uml2 or emf forum, decided on both.
> Its a hard one to recreate, but i've typically seen it when there are
> many background tasks running. I know there was a similar bug for
> getAppliedStereotypes(), just wondering if there is a fix or
> workaround for this issue? Any help appreciated.
>
> Cheers,
>
> Paul


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
Next Topic:type conformance
Goto Forum:
  


Current Time: Sat Apr 20 01:08:56 GMT 2024

Powered by FUDForum. Page generated in 0.02672 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top