Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » IllegalStateException: Cannot modify resource set without a write transaction
IllegalStateException: Cannot modify resource set without a write transaction [message #415153] Sun, 02 December 2007 18:48 Go to next message
Soeren Kemmann is currently offline Soeren KemmannFriend
Messages: 15
Registered: July 2009
Junior Member
Hi there,

when performing a change of my model in a subclassed RecordingCommand I get
this ugly error:
IllegalStateException: Cannot modify resource set without a write
transaction
The situation in more detail:
I have a model ModelA, which has the Attribute B.
I have subclassed RecordingCommand in the way, that I pass ModelA and the
Attribute B to the new RecordingCommand.
In the doExecute() method I now just want to do the following:
ModelA.setB(B)
.... but I always get this error!?

Has anyone an idea??

Thanks a lot!!

S
Re: IllegalStateException: Cannot modify resource set without a write transaction [message #415159 is a reply to message #415153] Mon, 03 December 2007 12:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Soeren,

I'm sure Christian will have a more helpful answer but I wonder if
you've read the help documentation (available in the IDE's help) he
wrote which I'm pretty sure will answer this basic question?


Soeren Kemmann wrote:
> Hi there,
>
> when performing a change of my model in a subclassed RecordingCommand I get
> this ugly error:
> IllegalStateException: Cannot modify resource set without a write
> transaction
> The situation in more detail:
> I have a model ModelA, which has the Attribute B.
> I have subclassed RecordingCommand in the way, that I pass ModelA and the
> Attribute B to the new RecordingCommand.
> In the doExecute() method I now just want to do the following:
> ModelA.setB(B)
> .... but I always get this error!?
>
> Has anyone an idea??
>
> Thanks a lot!!
>
> Sören
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: IllegalStateException: Cannot modify resource set without a write transaction [message #415164 is a reply to message #415153] Mon, 03 December 2007 15:19 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Soeren,

The RecordingCommand will not actually create a transaction. It relies on
the TransactionalCommandStack to do that. Is it possible that you're not
actually using your editing domain's command stack to execute the command?

if you have multiple transactional editing domains, is it possible that the
command is trying (perhaps inadvertently) to change objects in another
domain?

HTH,

Christian

Soeren Kemmann wrote:

> Hi there,
>
> when performing a change of my model in a subclassed RecordingCommand I
> get this ugly error:
> IllegalStateException: Cannot modify resource set without a write
> transaction
> The situation in more detail:
> I have a model ModelA, which has the Attribute B.
> I have subclassed RecordingCommand in the way, that I pass ModelA and the
> Attribute B to the new RecordingCommand.
> In the doExecute() method I now just want to do the following:
> ModelA.setB(B)
> ... but I always get this error!?
>
> Has anyone an idea??
>
> Thanks a lot!!
>
> Sren
Previous Topic:Obtain (kind of) unique ID for EMF elements
Next Topic:How to handle diagram file missing
Goto Forum:
  


Current Time: Fri Apr 26 06:45:58 GMT 2024

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

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

Back to the top