Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO and ConcurrentModificationException
CDO and ConcurrentModificationException [message #56509] Wed, 04 October 2006 15:28 Go to next message
Eclipse UserFriend
Originally posted by: yannick.lizzi.silogic.fr

Hi all,

I get a ConcurrentModificationException when saving a resource after
getting and modifing its content, and I don't understand why...

I reproduced the error by modifying the CDO example project:
In project cdo.examples.ui -->
cdo.examples.ui.internal.actions.LoadResourceAction, I modify as follow:
....
private void loadResource() throws Exception {
.... // create resource manager
.... // load content of resource1

// Populate the model from the second resource.
System.out.println("--> TEST: Populate the model from the second resource");
Library library2 = (Library)resource2.getContents().get(0);
Book book = (Book)library2.getBooks().get(0);

book.setTitle("hello"); // my modif: try to update the book title

....

resourceManager.commit(); // commit modification
resourceManager.stop();

----
Once the library resources have been created, I invoke the Load library
resources to run my updates and the error happens when commit is invoked.

I get the same error if I update the book title after recreating a new
resource manager with a new resource set (just after the
resourceManager.stop()).


First, I would like to understand why ;), and also what are the
differences between this way of modifying the model and the way showed
in the example (that is via the cdo editor).


Thanks
Yannick
Re: CDO and ConcurrentModificationException [message #56565 is a reply to message #56509] Wed, 04 October 2006 17:53 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Yannick,

It's simply a bug. I've fixed it and tomorrows maintenance build will
have the correction.
If you want to read about the cause refer to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159765

Cheers
/Eike


Yannick Lizzi schrieb:
> Hi all,
>
> I get a ConcurrentModificationException when saving a resource after
> getting and modifing its content, and I don't understand why...
>
> I reproduced the error by modifying the CDO example project:
> In project cdo.examples.ui -->
> cdo.examples.ui.internal.actions.LoadResourceAction, I modify as follow:
> ....
> private void loadResource() throws Exception {
> .... // create resource manager
> .... // load content of resource1
>
> // Populate the model from the second resource.
> System.out.println("--> TEST: Populate the model from the second
> resource");
> Library library2 = (Library)resource2.getContents().get(0);
> Book book = (Book)library2.getBooks().get(0);
>
> book.setTitle("hello"); // my modif: try to update the book title
>
> ....
>
> resourceManager.commit(); // commit modification
> resourceManager.stop();
>
> ----
> Once the library resources have been created, I invoke the Load
> library resources to run my updates and the error happens when commit
> is invoked.
>
> I get the same error if I update the book title after recreating a new
> resource manager with a new resource set (just after the
> resourceManager.stop()).
>
>
> First, I would like to understand why ;), and also what are the
> differences between this way of modifying the model and the way showed
> in the example (that is via the cdo editor).
>
>
> Thanks
> Yannick
Re: CDO and ConcurrentModificationException [message #593663 is a reply to message #56509] Wed, 04 October 2006 17:53 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Yannick,

It's simply a bug. I've fixed it and tomorrows maintenance build will
have the correction.
If you want to read about the cause refer to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159765

Cheers
/Eike


Yannick Lizzi schrieb:
> Hi all,
>
> I get a ConcurrentModificationException when saving a resource after
> getting and modifing its content, and I don't understand why...
>
> I reproduced the error by modifying the CDO example project:
> In project cdo.examples.ui -->
> cdo.examples.ui.internal.actions.LoadResourceAction, I modify as follow:
> ....
> private void loadResource() throws Exception {
> .... // create resource manager
> .... // load content of resource1
>
> // Populate the model from the second resource.
> System.out.println("--> TEST: Populate the model from the second
> resource");
> Library library2 = (Library)resource2.getContents().get(0);
> Book book = (Book)library2.getBooks().get(0);
>
> book.setTitle("hello"); // my modif: try to update the book title
>
> ....
>
> resourceManager.commit(); // commit modification
> resourceManager.stop();
>
> ----
> Once the library resources have been created, I invoke the Load
> library resources to run my updates and the error happens when commit
> is invoked.
>
> I get the same error if I update the book title after recreating a new
> resource manager with a new resource set (just after the
> resourceManager.stop()).
>
>
> First, I would like to understand why ;), and also what are the
> differences between this way of modifying the model and the way showed
> in the example (that is via the cdo editor).
>
>
> Thanks
> Yannick


Previous Topic:[OCL] Resolving properties, ambiguities
Next Topic:[OCL] Resolving properties, ambiguities
Goto Forum:
  


Current Time: Tue Apr 23 06:15:53 GMT 2024

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

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

Back to the top