Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » [OCL] Unknown type error during validation
[OCL] Unknown type error during validation [message #207996] Wed, 08 October 2008 07:02 Go to next message
Eclipse UserFriend
Originally posted by: julien.legrand.bull.net

Hello.

I faced an OCL exception during a gmfmap file validation.

Here is the exception :
Invalid expression body 'JOnASProfile::EJB'. Cause: Invalid expression
body 'JOnASProfile::EJB'. Cause: ERROR in
(enumerationOrClassLiteralExpCS): (Unknown type ([JOnASProfile, EJB]))

This exception occurs in a Sequence Initializer of a type JOnAS defined
in a different package (and a different ecore file) than the datatype
JOnASProfile.

Do you have an idea about what i'm doing wrong ?

Thanks.

Julien
Re: [OCL] Unknown type error during validation [message #208097 is a reply to message #207996] Wed, 08 October 2008 12:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Julien,

Is JOnASProfile::EJB an enumeration literal? If so, then in will be in
some EPackage, which you must include in a qualified-name reference. If
JOnASProfile isn't in the same EPackage as the context EClass of your
OCL constraint, then you must fully qualify the reference. e.g.,
otherpackage::JOnASProfile::EJB

HTH,

Christian

Julien Legrand wrote:
> Hello.
>
> I faced an OCL exception during a gmfmap file validation.
>
> Here is the exception :
> Invalid expression body 'JOnASProfile::EJB'. Cause: Invalid expression
> body 'JOnASProfile::EJB'. Cause: ERROR in
> (enumerationOrClassLiteralExpCS): (Unknown type ([JOnASProfile, EJB]))
>
> This exception occurs in a Sequence Initializer of a type JOnAS defined
> in a different package (and a different ecore file) than the datatype
> JOnASProfile.
>
> Do you have an idea about what i'm doing wrong ?
>
> Thanks.
>
> Julien
Re: [OCL] Unknown type error during validation [message #208103 is a reply to message #208097] Wed, 08 October 2008 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: julien.legrand.bull.net

Hi Christian,

JOnASProfile::EJB is actually an enumeration literal. JOnASProfile is
contained in the EPackage named "jonas".

The Eclass on which I want to apply the OCL constraint is in the
EPackage named "jonas4".

I try to replace JOnASProfile::EJB with jonas::JOnASProfile::EJB,
without success.

I also try to use Java package name instead of the EPackage name but
result was the same.

Any idea about what i'm doing wrong ?

Thanks.

Julien



Christian W. Damus a écrit :
> Hi, Julien,
>
> Is JOnASProfile::EJB an enumeration literal? If so, then in will be in
> some EPackage, which you must include in a qualified-name reference. If
> JOnASProfile isn't in the same EPackage as the context EClass of your
> OCL constraint, then you must fully qualify the reference. e.g.,
> otherpackage::JOnASProfile::EJB
>
> HTH,
>
> Christian
>
> Julien Legrand wrote:
>> Hello.
>>
>> I faced an OCL exception during a gmfmap file validation.
>>
>> Here is the exception :
>> Invalid expression body 'JOnASProfile::EJB'. Cause: Invalid expression
>> body 'JOnASProfile::EJB'. Cause: ERROR in
>> (enumerationOrClassLiteralExpCS): (Unknown type ([JOnASProfile, EJB]))
>>
>> This exception occurs in a Sequence Initializer of a type JOnAS
>> defined in a different package (and a different ecore file) than the
>> datatype JOnASProfile.
>>
>> Do you have an idea about what i'm doing wrong ?
>>
>> Thanks.
>>
>> Julien
Re: [OCL] Unknown type error during validation [message #208112 is a reply to message #208103] Wed, 08 October 2008 16:57 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Julien,

The name jonas::JOnASProfile::EJB is, actually, what you should use.

Is it only in validating the gmfmap model that you have this problem?
Does the constraint work when you run your editor? It should work at
run-time, with the above-named enumeration literal.

One factor that may be an issue is whether the jonas package has been
loaded in the EPackage registry by the time that this constraint is
parsed by gmfmap validation. If not, then the OCL parser will not know
how to find the package to resolve the enumeration name reference. Try
making sure that the EPackage is initialized by, for example, opening an
instance of the jonas model in your workbench.

Other than this, there may be something GMF-specific going on. This
problem has been raised a few times before, on this newsgroup. A search
for those threads may reveal something that will help you.

Cheers,

Christian

Julien Legrand wrote:
> Hi Christian,
>
> JOnASProfile::EJB is actually an enumeration literal. JOnASProfile is
> contained in the EPackage named "jonas".
>
> The Eclass on which I want to apply the OCL constraint is in the
> EPackage named "jonas4".
>
> I try to replace JOnASProfile::EJB with jonas::JOnASProfile::EJB,
> without success.
>
> I also try to use Java package name instead of the EPackage name but
> result was the same.
>
> Any idea about what i'm doing wrong ?
>
> Thanks.
>
> Julien
>
>
>
> Christian W. Damus a écrit :
>> Hi, Julien,
>>
>> Is JOnASProfile::EJB an enumeration literal? If so, then in will be
>> in some EPackage, which you must include in a qualified-name
>> reference. If JOnASProfile isn't in the same EPackage as the context
>> EClass of your OCL constraint, then you must fully qualify the
>> reference. e.g., otherpackage::JOnASProfile::EJB
>>
>> HTH,
>>
>> Christian
>>
>> Julien Legrand wrote:
>>> Hello.
>>>
>>> I faced an OCL exception during a gmfmap file validation.
>>>
>>> Here is the exception :
>>> Invalid expression body 'JOnASProfile::EJB'. Cause: Invalid
>>> expression body 'JOnASProfile::EJB'. Cause: ERROR in
>>> (enumerationOrClassLiteralExpCS): (Unknown type ([JOnASProfile, EJB]))
>>>
>>> This exception occurs in a Sequence Initializer of a type JOnAS
>>> defined in a different package (and a different ecore file) than the
>>> datatype JOnASProfile.
>>>
>>> Do you have an idea about what i'm doing wrong ?
>>>
>>> Thanks.
>>>
>>> Julien
Previous Topic:Prohibit moving nodes into compartments
Next Topic:Selection Listener
Goto Forum:
  


Current Time: Sat Apr 20 00:52:21 GMT 2024

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

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

Back to the top