[ATL] SEVERE: The 'no null' constraint is violated [message #94823] |
Mon, 10 November 2008 05:30  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>>>
|
|
|
Powered by
FUDForum. Page generated in 0.04418 seconds