Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » IllegalStateException on plain vanilla install of OCL(Eclipse CompleteOCL Editor throws with message "cannot modify resource set without a write transaction")
IllegalStateException on plain vanilla install of OCL [message #1761201] Mon, 08 May 2017 19:59 Go to next message
Vivek Pai is currently offline Vivek PaiFriend
Messages: 3
Registered: May 2017
Junior Member
Hi,

I followed the following steps.
Step 1. Installed Eclipse Modeling Tools package (Neon.3) from https://eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/3/eclipse-modeling-neon-3-macosx-cocoa-x86_64.tar.gz.

Step 2. I installed Eclipse OCL 6.1.2 from Marketplace (or update site - it doesn't seem to matter which).

Step 3. I created an Ecore Modeling Project

Step 4. I created an Ecore Model using Ecore Modeling Tools. The model is simple - two classes with a composition between them which is unidirectional. No changes to the model were made at all.

Step 5. I created an CompleteOCL file

At this point, the editor complains as noted in the title of this post.

Instead of step 5, I tried creating a plain ocl (edited using vi, that contains the same contents as that created by CompleteOCL file wizard). I also created dynamic instances and stored them in an XMI file. When trying to load the OCL document from the Ecore Editor (or any other means), the same exception is thrown.

Am I doing something wrong or is this a known issue? I am not very familiar with EMF and OCL in Eclipse.

Thanks for any help.

-vkp
Re: IllegalStateException on plain vanilla install of OCL [message #1761300 is a reply to message #1761201] Tue, 09 May 2017 14:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

(Eclipse OCL is part of the Simultaneous release so you can install it more easily via Help->Install New Software...)

I'm not telepathic. How did you create a Complete OCL file? Your Ecore model may be simple but there are still ample opportunities for me to recreate it different to you. Please provide the Ecore. What is the exception?

Regards

Ed Willink
Re: IllegalStateException on plain vanilla install of OCL [message #1763271 is a reply to message #1761300] Fri, 12 May 2017 09:59 Go to previous messageGo to next message
Vivek Pai is currently offline Vivek PaiFriend
Messages: 3
Registered: May 2017
Junior Member
Hi Ed,

I created the ecore model with Ecore Tools and the diagram editor that comes with it. There is a Sirius representation for the ecore file. The project has a single viewpoint - Design - selected.

The ecore file I produced is attached. So is the CompleteOCL file which I created by hand by typing in the definitions in a text editor. I don't have the error log. However, the error shown is:

"IllegalStateException: Cannot modify resource set without a write transaction".

I haven't experienced this problem in a project without a representation. In all projects with representations I do.

-vkp
PS:
>> "I'm not telepathic...."
Oooops, I didn't realize that! Will keep that in mind in the future.
  • Attachment: testocl.ecore
    (Size: 1.63KB, Downloaded 58 times)
  • Attachment: testocl.ocl
    (Size: 0.43KB, Downloaded 43 times)
Re: IllegalStateException on plain vanilla install of OCL [message #1763289 is a reply to message #1763271] Fri, 12 May 2017 11:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

I see nothing wrong with either of your files in my workspace. The testocl.ocl opens fine in the Complete OCL editor. I do not currently have Sirius installed.

I could understand the problem if you did "OCL->Load Document" in the Ecore Tools editor. This would be an OCL bug in failing to re-use the Ecore Tools ResourceSet consistently.

However you appear to be failing to open the Complete OCL editor. This appears to be a Sirius bug in that it infects other tools.

Can you please do an experiment in your workspace.

Restart Eclipse with no editors active.
Double click/Open With... on testocl.ocl to open the Complete OCL editor. Does it work?
Close Complete OCL editor.
Open With... on testocl.ecore to open the Sample Ecore editor. Does it work?
Double click/Open With... on testocl.ocl to open the Complete OCL editor. Does it work?
Close Complete OCL editor and Sample Ecore Editor.
Open With on testocl.ecore to open the Ecore Tools editor. Does it work?
Close Ecore Tools Editor.
Double click/Open With... on testocl.ocl to open the Complete OCL editor. Does it work?
Close Complete OCL editor.
Open With on testocl.ecore to open the Ecore Tools editor. Does it work?
Double click/Open With... on testocl.ocl to open the Complete OCL editor. Does it work?

At some point I anticipate that your IllegalStateException should occur and, perhaps in the error log, the exception trace should be visible.

What version of Sirius etc are you using? Cutting and Pasting from Help->About Eclipse SDK->Installation Details->Configuration should provide all version info.

Regards

Ed Willink

Re: IllegalStateException on plain vanilla install of OCL [message #1763388 is a reply to message #1763289] Mon, 15 May 2017 07:08 Go to previous message
Vivek Pai is currently offline Vivek PaiFriend
Messages: 3
Registered: May 2017
Junior Member
Hi Ed,

Thanks for the quick reply.
I am currently traveling. Will be back coming weekend. I will do the experiment and get back to you then (I have eclipse only on my workstations).

-vkp
Previous Topic:UML constraints context
Next Topic:Possible problems with implicit properties of Stereotypes
Goto Forum:
  


Current Time: Sat Sep 22 16:30:37 GMT 2018

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

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

Back to the top