CDO and ConcurrentModificationException [message #56509] |
Wed, 04 October 2006 15:28 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.03865 seconds