Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Getting org.eclipse.ocl.SemanticException: Cannot find operation (allOwnedElements()) for the type..(When OCL validating an UML model with profile (stereotypes))
icon5.gif  Getting org.eclipse.ocl.SemanticException: Cannot find operation (allOwnedElements()) for the type.. [message #531507] Wed, 05 May 2010 09:34
Shaman_Mahmoudi  is currently offline Shaman_Mahmoudi Friend
Messages: 16
Registered: February 2010
Junior Member
Hi,

I have an UML model with an applied profile. I am trying to validate the model with OCL validate and I am getting this error Cannot find operation (allOwnedElements()) for the type xxx. This exception is thrown in

oclInv =  (Constraint) oclHelper.createInvariant((String) tuple.getValue("invariant"));

in the method private List<Constraint> createConstraintsFrom(Stereotype stereotype, OCLExpression<Classifier> query) throws ParserException{...}


of OCLUMLConstraint class from papyrus.

What I did was that I changed the line oclHelper.setContext(stereotype); to oclHelper.setContext(metaClass); and it suddenly worked. But now some other stereotypes and their applied constrants will not work. Any hint of what is causing this? Thanks in advance!

Previous Topic:Papyrus introduction
Next Topic:Getting org.eclipse.ocl.SemanticException: Cannot find operation (allOwnedElements()) for the type..
Goto Forum:
  


Current Time: Fri Apr 26 17:37:18 GMT 2024

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

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

Back to the top