Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Validation action failed due to attribute type is 'long'
Validation action failed due to attribute type is 'long' [message #595673] Wed, 15 November 2006 13:43
Andreas Werner is currently offline Andreas WernerFriend
Messages: 55
Registered: July 2009
Member
Hi newsgroup,

I defined an attribute invariant via OCL:
self.property>=0

If this property has the type EInt everything is fine and the Validation
action in my GMF editor works as expercted.

But if the type of the property is changed into ELong, I get a
'Validation action failed' message with the following stack trace:

java.lang.ClassCastException: java.lang.Integer
at java.lang.Long.compareTo(Unknown Source)
at org.eclipse.emf.ocl.expressions.impl.EvaluationVisitorImpl.
visitOperationCallExp(EvaluationVisitorImpl.java:1054)
at org.eclipse.emf.ocl.expressions.impl.OperationCallExpImpl.ac cept
(OperationCallExpImpl.java:274)
at org.eclipse.emf.ocl.query.impl.QueryImpl.evaluate(QueryImpl. java:242)
at org.eclipse.emf.ocl.query.impl.QueryImpl.check(QueryImpl.jav a:278)
....

Is that OCL expression not applicable for 'long' properties?

Thanks, Andreas


PS: I'm using version 1.01 of EMFT OCL.
Previous Topic:How to declare type of empty collection in OCL?
Next Topic:Validation action failed due to attribute type is 'long'
Goto Forum:
  


Current Time: Fri Apr 26 18:38:35 GMT 2024

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

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

Back to the top