Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] SEVERE: The 'no null' constraint is violated
[ATL] SEVERE: The 'no null' constraint is violated [message #94823] Mon, 10 November 2008 05:30 Go to next message
Eclipse UserFriend
Hi all,

I have a transformation which is returning an exception, when I try and
create an XML model. I have found the exception to be cased by children <-
item.seqControlMode, below. This seems to be because sometimes
item.seqControlMode is empty and sometimes has a value (when i set up the
model to guarantee there to be a seqControlMode no error occurs.

Does anybody have any ideas - the exception is below the ATL code.

Thanks everybody.

Mark

rule item{
from
item:SCORM!Item

to
element:XML!Element(
name<- 'item',
children <- identifierref,
children <- identifier,
children <- title,
--EXCEPTION CAUSED BY THE LINE BELOW
children <- item.seqControlMode,
children <- item.items

),

[am3.atl] SEVERE: ****** BEGIN Stack Trace
[am3.atl] SEVERE: exception:
[am3.atl] SEVERE: The 'no null' constraint is violated
[am3.atl] java.lang.IllegalArgumentException: The 'no null'
constraint is violated
Re: [ATL] SEVERE: The 'no null' constraint is violated [message #94860 is a reply to message #94823] Mon, 10 November 2008 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mark

I think when your seqControlMode is empty ATL puts a null reference and
the model integrity is violated indeed you have a no null constraint

maybe you should check if your seqControlMode IsEmpty then adding with a
called rule a default element ?


Mark Melia a écrit :
> Hi all,
>
> I have a transformation which is returning an exception, when I try and
> create an XML model. I have found the exception to be cased by children
> <- item.seqControlMode, below. This seems to be because sometimes
> item.seqControlMode is empty and sometimes has a value (when i set up
> the model to guarantee there to be a seqControlMode no error occurs.
>
> Does anybody have any ideas - the exception is below the ATL code.
>
> Thanks everybody.
>
> Mark
>
> rule item{
> from
> item:SCORM!Item
>
> to
> element:XML!Element(
> name<- 'item',
> children <- identifierref,
> children <- identifier,
> children <- title,
> --EXCEPTION CAUSED BY THE LINE BELOW
> children <- item.seqControlMode,
> children <- item.items
>
> ),
>
> [am3.atl] SEVERE: ****** BEGIN Stack Trace
> [am3.atl] SEVERE: exception: [am3.atl] SEVERE: The 'no null'
> constraint is violated
> [am3.atl] java.lang.IllegalArgumentException: The 'no null'
> constraint is violated
>
Re: [ATL] SEVERE: The 'no null' constraint is violated [message #94875 is a reply to message #94860] Mon, 10 November 2008 07:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi Tristan,

Thanks for your reply!

Tried to do a check to see is seqControlMode.isOclUndefined(), but I then
get the following error:
[am3.atl] SEVERE: message: transformation module "SC2XML" does not
have an initialized field named "seqControlMode"

Any other ideas?
thanks,
Mark

Tristan FAURE wrote:

> Hi Mark

> I think when your seqControlMode is empty ATL puts a null reference and
> the model integrity is violated indeed you have a no null constraint

> maybe you should check if your seqControlMode IsEmpty then adding with a
> called rule a default element ?


> Mark Melia a écrit :
>> Hi all,
>>
>> I have a transformation which is returning an exception, when I try and
>> create an XML model. I have found the exception to be cased by children
>> <- item.seqControlMode, below. This seems to be because sometimes
>> item.seqControlMode is empty and sometimes has a value (when i set up
>> the model to guarantee there to be a seqControlMode no error occurs.
>>
>> Does anybody have any ideas - the exception is below the ATL code.
>>
>> Thanks everybody.
>>
>> Mark
>>
>> rule item{
>> from
>> item:SCORM!Item
>>
>> to
>> element:XML!Element(
>> name<- 'item',
>> children <- identifierref,
>> children <- identifier,
>> children <- title,
>> --EXCEPTION CAUSED BY THE LINE BELOW
>> children <- item.seqControlMode,
>> children <- item.items
>>
>> ),
>>
>> [am3.atl] SEVERE: ****** BEGIN Stack Trace
>> [am3.atl] SEVERE: exception: [am3.atl] SEVERE: The 'no null'
>> constraint is violated
>> [am3.atl] java.lang.IllegalArgumentException: The 'no null'
>> constraint is violated
>>
Re: [ATL] SEVERE: The 'no null' constraint is violated [message #94905 is a reply to message #94875] Mon, 10 November 2008 07:45 Go to previous message
Eclipse UserFriend
Apologies Tristan - I should have been using oclIsUndefined.

Thanks for your suggestion!

Mark

Mark Melia wrote:

> Hi Tristan,

> Thanks for your reply!

> Tried to do a check to see is seqControlMode.isOclUndefined(), but I then
> get the following error:
> [am3.atl] SEVERE: message: transformation module "SC2XML" does not
> have an initialized field named "seqControlMode"

> Any other ideas?
> thanks,
> Mark

> Tristan FAURE wrote:

>> Hi Mark

>> I think when your seqControlMode is empty ATL puts a null reference and
>> the model integrity is violated indeed you have a no null constraint

>> maybe you should check if your seqControlMode IsEmpty then adding with a
>> called rule a default element ?


>> Mark Melia a écrit :
>>> Hi all,
>>>
>>> I have a transformation which is returning an exception, when I try and
>>> create an XML model. I have found the exception to be cased by children
>>> <- item.seqControlMode, below. This seems to be because sometimes
>>> item.seqControlMode is empty and sometimes has a value (when i set up
>>> the model to guarantee there to be a seqControlMode no error occurs.
>>>
>>> Does anybody have any ideas - the exception is below the ATL code.
>>>
>>> Thanks everybody.
>>>
>>> Mark
>>>
>>> rule item{
>>> from
>>> item:SCORM!Item
>>>
>>> to
>>> element:XML!Element(
>>> name<- 'item',
>>> children <- identifierref,
>>> children <- identifier,
>>> children <- title,
>>> --EXCEPTION CAUSED BY THE LINE BELOW
>>> children <- item.seqControlMode,
>>> children <- item.items
>>>
>>> ),
>>>
>>> [am3.atl] SEVERE: ****** BEGIN Stack Trace
>>> [am3.atl] SEVERE: exception: [am3.atl] SEVERE: The 'no null'
>>> constraint is violated
>>> [am3.atl] java.lang.IllegalArgumentException: The 'no null'
>>> constraint is violated
>>>
Previous Topic:[ATL] generation of a GMF editor for target model
Next Topic:ATL: Problem with Nesting rule
Goto Forum:
  


Current Time: Wed Jul 16 00:19:18 EDT 2025

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

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

Back to the top