|
Re: java.lang.IllegalStateException: Cannot modify resource set without a write transaction [message #1694988 is a reply to message #1694865] |
Mon, 11 May 2015 08:58 |
|
Le 08/05/2015 16:28, Regent LArcheveque a écrit :
> Hi,
Hi,
> We just started to use Sirius few weeks ago. It is really great.
Thanks.
> Unfortunately I have trouble to integrate it into an existing project.
> We have a very huge extensible meta-model that is divided into many
> extensible sub meta-models. Most parts of the models are changed by
> the user via the Editor and UI Properties. However, many parts are
> populated on purpose without using any command stack or editing domain.
> For these parts, we do not care about undo/redo capabilities. We use
> for few years the default generated EMF Editor and we do not have any
> issue. When I use the Model Explorer and try to browse the same EMF
> model I get IllegalStateExceptions. I know that we must use
> EditingDomain to change models. But this is not an adequate use case
> for us mainly because our some parts of the EMF models are connected to
> non-UI interface modules. This really prevents us to exploit Sirius.
> Is there a way to fix this.
> I am a bit confused and I do not know how to address this fundamental
> question. If further explanations are required please let me know.
Yes, this description is quite too simple to help you. When exactly
occurs the IllegalStateException, on which action?
>
> Thanks in advance for any tips
>
> Régent ;)
Regards,
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: java.lang.IllegalStateException: Cannot modify resource set without a write transaction [message #1695048 is a reply to message #1695019] |
Mon, 11 May 2015 15:15 |
|
Le 11/05/2015 14:38, Regent LArcheveque a écrit :
> Hi Laurent,
> the problem occurs when I start to dig into the model via the Model
> Explorer. At that point, we have overloaded getters (using getter<Gen>,
> getter and generated NOT) that get called. Some getters change the
> model without using any transaction on purpose.
:(
> I do not know if these
> information are enough.
I think it's enough. Unfortunately, enough to say, that I not really see
a solution except impacting your code to respect EMFT.
> I'll try to reproduce my problem with a simple
> example and I'll post it.
>
In a first time, could you join the corresponding stack of the
llegalStateException? To confirm that the problem is the
TransactionChangeRecorder that checks the write access before modifying
the model.
> ;)
>
>
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: java.lang.IllegalStateException: Cannot modify resource set without a write transaction [message #1698947 is a reply to message #1695187] |
Fri, 19 June 2015 06:33 |
|
I have another questions concerning your problem:
- Why is the model modified during the getter calls? What are the reasons?
Another approach is to add the "content" during the initialization
(creation) of each new instance of object (and not to add it during the
getter call).
Le 12/05/2015 16:31, Regent LArcheveque a écrit :
> Hi Laurent,
> Indeed it is the TransactionChangeRecorder that reports the problem.
>
> Here is the error log stack:
>
> java.lang.IllegalStateException: Cannot modify resource set without a
> write transaction
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(TransactionChangeRecorder.java:348)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(TransactionChangeRecorder.java:302)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processObjectNotification(TransactionChangeRecorder.java:284)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:240)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.CartesianTriangularMeshMapLayerImpl.setMeshIsDirty(CartesianTriangularMeshMapLayerImpl.java:97)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.CartesianTriangularMeshURLMapLayerImpl.loadMesh(CartesianTriangularMeshURLMapLayerImpl.java:349)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.CartesianTriangularMeshURLMapLayerImpl.getMesh(CartesianTriangularMeshURLMapLayerImpl.java:128)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.CartesianTriangularMeshURLMapLayerImpl.getCurrentMesh(CartesianTriangularMeshURLMapLayerImpl.java:174)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.CartesianTriangularMeshMapLayerImpl.getAbstractMapLayerNode(CartesianTriangularMeshMapLayerImpl.java:208)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.MapNodeImpl.addLayer(MapNodeImpl.java:215)
>
> at
> ca.gc.asc_csa.symphony.environment.impl.MapNodeImpl$1$1.run(MapNodeImpl.java:299)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03198 seconds