Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » HutnGenerationException in property of an element
HutnGenerationException in property of an element [message #638730] Fri, 12 November 2010 06:44 Go to next message
Jes is currently offline Jes
Messages: 9
Registered: November 2010
Junior Member
Hello!

I'm having problems with one attribute of an element in a model. The syntax has no errors but when I try to generate the model, an exception appears:

org.eclipse.epsilon.hutn.exceptions.HutnGenerationException: Invalid assignment to property 'represents' (69:26)
at org.eclipse.epsilon.hutn.generate.model.ModelGenerator.gener ate(ModelGenerator.java:124)
...

The model I'm using:

@Spec {
metamodel "DD" {
nsUri: "http://datadictionary/1.0"
}
}

datadictionary {
GlobalBusinessDataDictionary "gbddName" {
name: "gbddName"
code: "000"
MainOrganization: MainOrganization " /es.cv.gvcase.linkers.dd2cld.test.data/models//hr.model#//@o rganizations.0 "
dataStructures: DataStructure "dsName" {
name: "dsName"
represents: Entity
isContainedBy: DataStructure "dsName"
contains: Field "F1" {
name: "F1"
isContainedBy: DataStructure "dsName"
}
}
}
}


'Represents' is a multivalued property (1..*) of the element DataStructure. The type of this property is enumeration, whose possible values are Interface or Entity.

Any ideas to solve the problem?

Thanks.

Re: HutnGenerationException in property of an element [message #638746 is a reply to message #638730] Fri, 12 November 2010 07:56 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Jes,

Sorry that you're having a problem with HUTN.

You're right, the syntax looks fine. Would you send a copy of the metamodel to me so that I can investigate? Our email address is below.

epsilon.devs AT gmail.com

Cheers,
Louis.

[Updated on: Fri, 12 November 2010 07:57]

Report message to a moderator

Re: HutnGenerationException in property of an element [message #639059 is a reply to message #638746] Mon, 15 November 2010 02:19 Go to previous messageGo to next message
Jes is currently offline Jes
Messages: 9
Registered: November 2010
Junior Member
I sent you the metamodel last friday... waiting for your reply!

Thanks.
Re: HutnGenerationException in property of an element [message #639108 is a reply to message #639059] Mon, 15 November 2010 05:46 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Jes,

Thanks -- I've just picked up your mail, and am about to start investigating.

Cheers,
Louis.
Re: HutnGenerationException in property of an element [message #639376 is a reply to message #639108] Tue, 16 November 2010 05:17 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Jes and I debugged this issue offline. In case anybody else runs into the same problem, the exception was caused by attempting to assign a model element as its own container.

The HUTN in Jes's first post specifies that the DataStructure, dsName, should be the value of its own isContainedBy feature, which is a containment reference. Recursive containment is not permitted in EMF.

This indicated a problem with the metamodel, and the isContainedBy reference was made optional, rather than mandatory.

Cheers,
Louis.
Previous Topic:Modulo operation in EOL
Next Topic:links created with EWL is not appearing in diagram
Goto Forum:
  


Current Time: Sat Aug 23 16:04:01 EDT 2014

Powered by FUDForum. Page generated in 0.02069 seconds