Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Parsing error in a UML::Constraint(Unable to parse a simple constraint in Papyrus)
Parsing error in a UML::Constraint [message #1720195] Fri, 15 January 2016 07:47 Go to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
I created a sample model in Papyrus with single constraint following the instructions given by the OCL documentation for defining a Class invariant. I get a the following parsing error on the constraint:

Failed to load 'platform:/resource/Test/Sample.uml.oclas

What do I need to do to have this file generated?


Yves
Re: Parsing error in a UML::Constraint [message #1720335 is a reply to message #1720195] Sun, 17 January 2016 16:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Without a repro, you are unlikely to get a solution.

*.oclas is the, normally only internal, name of a model normalized to
the OCL Pivot Abstract Syntax. *.oclas is normally registered so that
any access strips the extension, tries again to load the unnormalized
file, then normalizes it. (*.oclas is the prototype for the long overdue
ability to have a defined OCL XMI.)

Possibly you have fallen foul of

https://bugs.eclipse.org/bugs/show_bug.cgi?id=485668

although your error message bears little resemblance to

https://bugs.eclipse.org/bugs/show_bug.cgi?id=483181

The above bug is fixed in the latest OCL builds towards Mars.2 and Neon.

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.0.2/N201601131454/mdt-ocl-Update-N201601131454.zip

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.1.0/N201601170942/mdt-ocl-Update-N201601170942.zip

Regards

Ed Willink

On 15/01/2016 07:47, Yves BERNARD wrote:
> I created a sample model in Papyrus with single constraint following
> the instructions given by the OCL documentation for defining a Class
> invariant. I get a the following parsing error on the constraint:
>
> Failed to load 'platform:/resource/Test/Sample.uml.oclas
>
> What do I need to do to have this file generated?
Re: Parsing error in a UML::Constraint [message #1721606 is a reply to message #1720335] Thu, 28 January 2016 15:27 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Ed,

Thanks for your reply. I apologize for taking so long to react, I was stuck on another topic.

I updated my OCL version with the one you provide (for Mars) but the error is still there.

I provide the model this time.

Thanks,

  • Attachment: Sample.zip
    (Size: 4.22KB, Downloaded 227 times)


Yves
Re: Parsing error in a UML::Constraint [message #1721761 is a reply to message #1721606] Fri, 29 January 2016 21:28 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Sorry, I am unable to load your model. It uses SysML 1.4 facilities that
are not part of the Papyrus 1.2.0M4 distribution and not in the Papyrus
Additional Compoents.

Regards

Ed Willink


On 28/01/2016 15:27, Yves BERNARD wrote:
> Ed,
>
> Thanks for your reply. I apologize for taking so long to react, I was stuck on another topic.
>
> I updated my OCL version with the one you provide (for Mars) but the error is still there.
>
> I provide the model this time.
>
> Thanks,
>
>
Re: Parsing error in a UML::Constraint [message #1721795 is a reply to message #1721761] Sat, 30 January 2016 21:58 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Once I upgraded this model to the SysML 1.4 profile in my installation (ie. after the migrate profile functionality from Papyrus pops in), your constraint parses fine. Which version of papyrus/sysml1.4 are you running?
Re: Parsing error in a UML::Constraint [message #1721865 is a reply to message #1721795] Mon, 01 February 2016 07:34 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Hi Klaas,

Interesting...

Here is the info I can get from the SysML1.4 plugin:
Papyrus Sysml 1.4 Feature (Incubation) 0.7.0.201511250947 org.eclipse.papyrus.sysml14.feature.feature.group Eclipse Modeling Project

Thanks,


Yves
Re: Parsing error in a UML::Constraint [message #1721866 is a reply to message #1721865] Mon, 01 February 2016 07:48 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
I modified the sample in order to remove the SysML profile and then the problem vanished...
If I reapply the SysML 1.4 profile the problem reappears but it is not with the case with the profile corresponding to SysML 1.1.

So it appears that there is an incompatibility between the version of the SysML 1.4 profile plugin I use and the current version of OCL.

Klaas, I'm interested to know which version of this plugin you use.

Thanks,


Yves
Re: Parsing error in a UML::Constraint [message #1721876 is a reply to message #1721866] Mon, 01 February 2016 09:15 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

AFAIK if you're using SysML 1.4, bleeding edge is the most stable (generally Smile. I'm using

Papyrus Sysml 1.4 Feature (Incubation) 0.8.1.201601221455 org.eclipse.papyrus.sysml14.feature.feature.group Eclipse Modeling Project

from the hudson update: https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-mars/ws/releng/org.eclipse.papyrus.sysml14.p2/target/repository/
(see also https://hudson.eclipse.org/papyrus/view/Sysml/ )

HTH,

Klaas
Re: Parsing error in a UML::Constraint [message #1721878 is a reply to message #1721876] Mon, 01 February 2016 09:22 Go to previous message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
So, it looks like the version I use is outdated a bit.. Wink

I'm going to upgrade it.

Thanks!


Yves
Previous Topic:EMF validation with several OCL documents
Next Topic:Problems with hierarchical/embedded model packages
Goto Forum:
  


Current Time: Thu Mar 28 12:56:40 GMT 2024

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

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

Back to the top