Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] [BUG?] programmatic launch produces ATL transformation errors
[ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75662] Mon, 03 March 2008 11:04 Go to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hi guys,

I have a weird problem here, i'm assuming its a bug.
When I launch my ATL transformation manually it works perfectly well
without any errors.

Launching the same whole with the correct paths etc produces errors like:

SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: could not find operation getTemplateClass on
UML!Class having supertypes: [UML!BehavioredClassifier,
UML!EncapsulatedClassifier, OclType, OclAny] (including Java operations)

Here is a header of this operation:

helper context UML!Class def: getTemplateClass(): UML!Class

My guess is that the problem is with this context. When i replace the
function inline it stops complaining.

thanks in advance.
Regards,
Aram Hovsepyan.
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75751 is a reply to message #75662] Wed, 05 March 2008 09:34 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hey guys,

Could anyone tell me at least if I should bother looking into some errors
in my AtlStarter or should I just wait for a bug fix?

To remind - my transformation works perfectly when i invoke it manually.
When i call it programmatically from my plugin it gives an error.

thnx

Aram Hovsepyan wrote:

> Hi guys,
>
> I have a weird problem here, i'm assuming its a bug.
> When I launch my ATL transformation manually it works perfectly
> well
> without any errors.
>
> Launching the same whole with the correct paths etc produces
> errors like:
>
> SEVERE: ****** BEGIN Stack Trace
> SEVERE: message: ERROR: could not find operation getTemplateClass
> on UML!Class having supertypes: [UML!BehavioredClassifier,
> UML!EncapsulatedClassifier, OclType, OclAny] (including Java operations)
>
> Here is a header of this operation:
>
> helper context UML!Class def: getTemplateClass(): UML!Class
>
> My guess is that the problem is with this context. When i replace
> the
> function inline it stops complaining.
>
> thanks in advance.
> Regards,
> Aram Hovsepyan.
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75802 is a reply to message #75751] Wed, 05 March 2008 10:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------020306060502080901020802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

Are you sure that the UML metamodel is correctly loaded by your
programmatic launching?

(I had a similar problem for MOF)

Quentin GLINEUR

Aram Hovsepyan a
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75877 is a reply to message #75802] Wed, 05 March 2008 12:38 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hey Quentin,

How can I check on that? I think you are right. Somehow the UML metamodel
is not loaded correctly. In some other helper functions I have a check
oclIsTypeOf(UML!Class) and it returns false while manual invokation results
in true.
The UML metamodel is loaded though because i tried changing some paths and
ATL then starts giving NullPointer exceptions.

I would appreciate if you could send me the code samples you use to startup
the atl code. I'm using a 3rd party written AtlStarter and its not very
clear to me.

      Thanks in advance.

      Regards,
              Aram.

Quentin Glineur wrote:

> Hi,
>
> Are you sure that the UML metamodel is correctly loaded by your
> programmatic launching?
>
> (I had a similar problem for MOF)
>
> Quentin GLINEUR
>
> Aram Hovsepyan a écrit :
>> Hey guys,
>>
>> Could anyone tell me at least if I should bother looking into
>> some errors
>> in my AtlStarter or should I just wait for a bug fix?
>>
>> To remind - my transformation works perfectly when i invoke it
>> manually.
>> When i call it programmatically from my plugin it gives an error.
>>
>> thnx
>>
>> Aram Hovsepyan wrote:
>>
>>> Hi guys,
>>>
>>> I have a weird problem here, i'm assuming its a bug.
>>> When I launch my ATL transformation manually it works perfectly
>>> well
>>> without any errors.
>>>
>>> Launching the same whole with the correct paths etc produces
>>> errors like:
>>>
>>> SEVERE: ****** BEGIN Stack Trace
>>> SEVERE: message: ERROR: could not find operation
>>> getTemplateClass on UML!Class having supertypes:
>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType, OclAny]
>>> (including Java operations)
>>>
>>> Here is a header of this operation:
>>>
>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>
>>> My guess is that the problem is with this context. When i
>>> replace the
>>> function inline it stops complaining.
>>>
>>> thanks in advance.
>>> Regards,
>>> Aram Hovsepyan.
>>
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75894 is a reply to message #75877] Wed, 05 March 2008 13:31 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hi,

I managed to limit the scope of the problem. Here is a sample rule
-- Rule to copy classes
rule class2class {
from i : UML!Class (
thisModule.elementsToCopy()->includes(i)
)
to o : UML!Class mapsTo i
(
name <- i.name,
)
do
{
if(o.oclIsTypeOf(UML!Class))
'type is recognized'.println();
else
'should not happen'.println();
}
}

When invoked manually i get of course the type is recognized message. When
invoked programmatically i get the 'should not happen' output.

Help is really appreciated.
Thnx


Aram Hovsepyan wrote:

> Hey Quentin,
>
> How can I check on that? I think you are right. Somehow the UML
> metamodel
> is not loaded correctly. In some other helper functions I have a check
> oclIsTypeOf(UML!Class) and it returns false while manual invokation
> results in true.
> The UML metamodel is loaded though because i tried changing some
> paths and
> ATL then starts giving NullPointer exceptions.
>
> I would appreciate if you could send me the code samples you use
> to startup
> the atl code. I'm using a 3rd party written AtlStarter and its not very
> clear to me.
>
> Thanks in advance.
>
> Regards,
> Aram.
>
> Quentin Glineur wrote:
>
>> Hi,
>>
>> Are you sure that the UML metamodel is correctly loaded by your
>> programmatic launching?
>>
>> (I had a similar problem for MOF)
>>
>> Quentin GLINEUR
>>
>> Aram Hovsepyan a écrit :
>>> Hey guys,
>>>
>>> Could anyone tell me at least if I should bother looking into
>>> some errors
>>> in my AtlStarter or should I just wait for a bug fix?
>>>
>>> To remind - my transformation works perfectly when i invoke it
>>> manually.
>>> When i call it programmatically from my plugin it gives an error.
>>>
>>> thnx
>>>
>>> Aram Hovsepyan wrote:
>>>
>>>> Hi guys,
>>>>
>>>> I have a weird problem here, i'm assuming its a bug.
>>>> When I launch my ATL transformation manually it works perfectly
>>>> well
>>>> without any errors.
>>>>
>>>> Launching the same whole with the correct paths etc produces
>>>> errors like:
>>>>
>>>> SEVERE: ****** BEGIN Stack Trace
>>>> SEVERE: message: ERROR: could not find operation
>>>> getTemplateClass on UML!Class having supertypes:
>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType, OclAny]
>>>> (including Java operations)
>>>>
>>>> Here is a header of this operation:
>>>>
>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>
>>>> My guess is that the problem is with this context. When i
>>>> replace the
>>>> function inline it stops complaining.
>>>>
>>>> thanks in advance.
>>>> Regards,
>>>> Aram Hovsepyan.
>>>
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75911 is a reply to message #75894] Wed, 05 March 2008 13:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------050700060809000409060702
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi, you may have a look inside the QVT Relations source code (from the CVS).

The RelationsCompiler has quite an easy code to launch a transformation.

Regards,

Quentin

Aram Hovsepyan a écrit :
> Hi,
>
> I managed to limit the scope of the problem. Here is a sample rule
> -- Rule to copy classes
> rule class2class {
> from i : UML!Class (
> thisModule.elementsToCopy()->includes(i)
> )
> to o : UML!Class mapsTo i
> (
> name <- i.name,
> )
> do
> {
> if(o.oclIsTypeOf(UML!Class))
> 'type is recognized'.println();
> else
> 'should not happen'.println();
> }
> }
>
> When invoked manually i get of course the type is recognized message. When
> invoked programmatically i get the 'should not happen' output.
>
> Help is really appreciated.
> Thnx
>
>
> Aram Hovsepyan wrote:
>
>> Hey Quentin,
>>
>> How can I check on that? I think you are right. Somehow the UML
>> metamodel
>> is not loaded correctly. In some other helper functions I have a check
>> oclIsTypeOf(UML!Class) and it returns false while manual invokation
>> results in true.
>> The UML metamodel is loaded though because i tried changing some
>> paths and
>> ATL then starts giving NullPointer exceptions.
>>
>> I would appreciate if you could send me the code samples you use
>> to startup
>> the atl code. I'm using a 3rd party written AtlStarter and its not very
>> clear to me.
>>
>> Thanks in advance.
>>
>> Regards,
>> Aram.
>>
>> Quentin Glineur wrote:
>>
>>> Hi,
>>>
>>> Are you sure that the UML metamodel is correctly loaded by your
>>> programmatic launching?
>>>
>>> (I had a similar problem for MOF)
>>>
>>> Quentin GLINEUR
>>>
>>> Aram Hovsepyan a écrit :
>>>> Hey guys,
>>>>
>>>> Could anyone tell me at least if I should bother looking into
>>>> some errors
>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>
>>>> To remind - my transformation works perfectly when i invoke it
>>>> manually.
>>>> When i call it programmatically from my plugin it gives an error.
>>>>
>>>> thnx
>>>>
>>>> Aram Hovsepyan wrote:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>> When I launch my ATL transformation manually it works perfectly
>>>>> well
>>>>> without any errors.
>>>>>
>>>>> Launching the same whole with the correct paths etc produces
>>>>> errors like:
>>>>>
>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>> SEVERE: message: ERROR: could not find operation
>>>>> getTemplateClass on UML!Class having supertypes:
>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType, OclAny]
>>>>> (including Java operations)
>>>>>
>>>>> Here is a header of this operation:
>>>>>
>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>
>>>>> My guess is that the problem is with this context. When i
>>>>> replace the
>>>>> function inline it stops complaining.
>>>>>
>>>>> thanks in advance.
>>>>> Regards,
>>>>> Aram Hovsepyan.
>


--------------050700060809000409060702
Content-Type: text/x-vcard; charset=utf-8;
name="quentin_glineur.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="quentin_glineur.vcf"

YmVnaW46dmNhcmQNCmZuOlF1ZW50aW4gR0xJTkVVUg0KbjpHTElORVVSO1F1 ZW50aW4NCm9y
ZzpPYmVvIC0gTW9kZWwgRHJpdmVuIENvbXBhbnk7UmVzZWFyY2ggYW5kIERl dmVsb3BtZW50
DQphZHI7cXVvdGVkLXByaW50YWJsZTo7OzIgcnVlIFJvYmVydCBTY2h1bWFu bjtSZXo9QzM9
QTk7OzQ0NDAwO0ZyYW5jZQ0KZW1haWw7aW50ZXJuZXQ6cXVlbnRpbi5nbGlu ZXVyQG9iZW8u
ZnINCnRpdGxlOk1EQSBDb25zdWx0YW50DQp0ZWw7d29yazorMzMyIDUxIDEz IDU0IDE4DQp4
LW1vemlsbGEtaHRtbDpUUlVFDQp1cmw6aHR0cDovL3d3dy5vYmVvLmZyDQp2 ZXJzaW9uOjIu
MQ0KZW5kOnZjYXJkDQoNCg==
--------------050700060809000409060702--
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75931 is a reply to message #75911] Wed, 05 March 2008 14:09 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hi,

I think my UML metamodel is loaded fine.

Somehow the check with oclIsKindOf(UML!Class) does work. I am not familiar
with the internals of ATL but if it uses also internally the oclIsTypeOf to
match the context of a helper this might be the whole problem.



Quentin Glineur wrote:

> Hi, you may have a look inside the QVT Relations source code (from the
> CVS).
>
> The RelationsCompiler has quite an easy code to launch a transformation.
>
> Regards,
>
> Quentin
>
> Aram Hovsepyan a écrit :
>> Hi,
>>
>> I managed to limit the scope of the problem. Here is a sample
>> rule
>> -- Rule to copy classes
>> rule class2class {
>> from i : UML!Class (
>> thisModule.elementsToCopy()->includes(i)
>> )
>> to o : UML!Class mapsTo i
>> (
>> name <- i.name,
>> )
>> do
>> {
>> if(o.oclIsTypeOf(UML!Class))
>> 'type is recognized'.println();
>> else
>> 'should not happen'.println();
>> }
>> }
>>
>> When invoked manually i get of course the type is recognized message.
>> When invoked programmatically i get the 'should not happen' output.
>>
>> Help is really appreciated.
>> Thnx
>>
>>
>> Aram Hovsepyan wrote:
>>
>>> Hey Quentin,
>>>
>>> How can I check on that? I think you are right. Somehow the UML
>>> metamodel
>>> is not loaded correctly. In some other helper functions I have a check
>>> oclIsTypeOf(UML!Class) and it returns false while manual invokation
>>> results in true.
>>> The UML metamodel is loaded though because i tried changing some
>>> paths and
>>> ATL then starts giving NullPointer exceptions.
>>>
>>> I would appreciate if you could send me the code samples you use
>>> to startup
>>> the atl code. I'm using a 3rd party written AtlStarter and its not very
>>> clear to me.
>>>
>>> Thanks in advance.
>>>
>>> Regards,
>>> Aram.
>>>
>>> Quentin Glineur wrote:
>>>
>>>> Hi,
>>>>
>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>> programmatic launching?
>>>>
>>>> (I had a similar problem for MOF)
>>>>
>>>> Quentin GLINEUR
>>>>
>>>> Aram Hovsepyan a écrit :
>>>>> Hey guys,
>>>>>
>>>>> Could anyone tell me at least if I should bother looking into
>>>>> some errors
>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>
>>>>> To remind - my transformation works perfectly when i invoke it
>>>>> manually.
>>>>> When i call it programmatically from my plugin it gives an error.
>>>>>
>>>>> thnx
>>>>>
>>>>> Aram Hovsepyan wrote:
>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>> When I launch my ATL transformation manually it works
>>>>>> perfectly well
>>>>>> without any errors.
>>>>>>
>>>>>> Launching the same whole with the correct paths etc produces
>>>>>> errors like:
>>>>>>
>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>> [OclAny]
>>>>>> (including Java operations)
>>>>>>
>>>>>> Here is a header of this operation:
>>>>>>
>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>
>>>>>> My guess is that the problem is with this context. When i
>>>>>> replace the
>>>>>> function inline it stops complaining.
>>>>>>
>>>>>> thanks in advance.
>>>>>> Regards,
>>>>>> Aram Hovsepyan.
>>
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75959 is a reply to message #75931] Wed, 05 March 2008 14:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------010209050902080103020704
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Answer follows up.

Aram Hovsepyan a écrit :
> Hi,
>
> I think my UML metamodel is loaded fine.

Sorry to insist but what make you think so? (Can you give excerpt of
your code?) The metamodel is not loaded fine if it's metamodel is not
properly loaded.
>
> Somehow the check with oclIsKindOf(UML!Class) does work. I am not familiar
> with the internals of ATL but if it uses also internally the oclIsTypeOf to
> match the context of a helper this might be the whole problem.
>

No, oclIskindOf does not use oclIsTypeOf! It should come from somewhere
else!


>
> Quentin Glineur wrote:
>
>> Hi, you may have a look inside the QVT Relations source code (from the
>> CVS).
>>
>> The RelationsCompiler has quite an easy code to launch a transformation.
>>
>> Regards,
>>
>> Quentin
>>
>> Aram Hovsepyan a écrit :
>>> Hi,
>>>
>>> I managed to limit the scope of the problem. Here is a sample
>>> rule
>>> -- Rule to copy classes
>>> rule class2class {
>>> from i : UML!Class (
>>> thisModule.elementsToCopy()->includes(i)
>>> )
>>> to o : UML!Class mapsTo i
>>> (
>>> name <- i.name,
>>> )
>>> do
>>> {
>>> if(o.oclIsTypeOf(UML!Class))
>>> 'type is recognized'.println();
>>> else
>>> 'should not happen'.println();
>>> }
>>> }
>>>
>>> When invoked manually i get of course the type is recognized message.
>>> When invoked programmatically i get the 'should not happen' output.
>>>
>>> Help is really appreciated.
>>> Thnx
>>>
>>>
>>> Aram Hovsepyan wrote:
>>>
>>>> Hey Quentin,
>>>>
>>>> How can I check on that? I think you are right. Somehow the UML
>>>> metamodel
>>>> is not loaded correctly. In some other helper functions I have a check
>>>> oclIsTypeOf(UML!Class) and it returns false while manual invokation
>>>> results in true.
>>>> The UML metamodel is loaded though because i tried changing some
>>>> paths and
>>>> ATL then starts giving NullPointer exceptions.
>>>>
>>>> I would appreciate if you could send me the code samples you use
>>>> to startup
>>>> the atl code. I'm using a 3rd party written AtlStarter and its not very
>>>> clear to me.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Regards,
>>>> Aram.
>>>>
>>>> Quentin Glineur wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>>> programmatic launching?
>>>>>
>>>>> (I had a similar problem for MOF)
>>>>>
>>>>> Quentin GLINEUR
>>>>>
>>>>> Aram Hovsepyan a écrit :
>>>>>> Hey guys,
>>>>>>
>>>>>> Could anyone tell me at least if I should bother looking into
>>>>>> some errors
>>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>>
>>>>>> To remind - my transformation works perfectly when i invoke it
>>>>>> manually.
>>>>>> When i call it programmatically from my plugin it gives an error.
>>>>>>
>>>>>> thnx
>>>>>>
>>>>>> Aram Hovsepyan wrote:
>>>>>>
>>>>>>> Hi guys,
>>>>>>>
>>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>>> When I launch my ATL transformation manually it works
>>>>>>> perfectly well
>>>>>>> without any errors.
>>>>>>>
>>>>>>> Launching the same whole with the correct paths etc produces
>>>>>>> errors like:
>>>>>>>
>>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>>> [OclAny]
>>>>>>> (including Java operations)
>>>>>>>
>>>>>>> Here is a header of this operation:
>>>>>>>
>>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>>
>>>>>>> My guess is that the problem is with this context. When i
>>>>>>> replace the
>>>>>>> function inline it stops complaining.
>>>>>>>
>>>>>>> thanks in advance.
>>>>>>> Regards,
>>>>>>> Aram Hovsepyan.
>

Regards,

--------------010209050902080103020704
Content-Type: text/x-vcard; charset=utf-8;
name="quentin_glineur.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="quentin_glineur.vcf"

YmVnaW46dmNhcmQNCmZuOlF1ZW50aW4gR0xJTkVVUg0KbjpHTElORVVSO1F1 ZW50aW4NCm9y
ZzpPYmVvIC0gTW9kZWwgRHJpdmVuIENvbXBhbnk7UmVzZWFyY2ggYW5kIERl dmVsb3BtZW50
DQphZHI7cXVvdGVkLXByaW50YWJsZTo7OzIgcnVlIFJvYmVydCBTY2h1bWFu bjtSZXo9QzM9
QTk7OzQ0NDAwO0ZyYW5jZQ0KZW1haWw7aW50ZXJuZXQ6cXVlbnRpbi5nbGlu ZXVyQG9iZW8u
ZnINCnRpdGxlOk1EQSBDb25zdWx0YW50DQp0ZWw7d29yazorMzMyIDUxIDEz IDU0IDE4DQp4
LW1vemlsbGEtaHRtbDpUUlVFDQp1cmw6aHR0cDovL3d3dy5vYmVvLmZyDQp2 ZXJzaW9uOjIu
MQ0KZW5kOnZjYXJkDQoNCg==
--------------010209050902080103020704--
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #75976 is a reply to message #75959] Wed, 05 March 2008 14:53 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hi Quentin,

Here is an excerpt from my code where i launch the transformation with some
input models.

Map<String, ASMModel> models = new HashMap<String, ASMModel>();
HashMap<String, URL> libraries = new HashMap<String, URL>();
AtlModelHandler amh = getDefaultHandler();
ASMModel metaModel = ((AtlUML2ModelHandler) amh).loadModel("UML",
amh.getMof(), "uri:http://www.eclipse.org/uml2/2.1.0/UML");

ASMModel concern1 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN1",
metaModel,
URI.createURI(" file://home/barri/workspace-grecco/LabApplication/lab_applic ation.uml"));

ASMModel concern2 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN2",
metaModel,
URI.createURI(" file://home/barri/workspace/org.kuleuven.grecco_view/concern _library/application_firewall.uml"));

ASMModel mapping = ((AtlUML2ModelHandler)amh).loadModel("MAPPING",
metaModel,
URI.createURI(" file://home/barri/workspace-grecco/LabApplication/Mapping.um l"));

ASMModel outputModel =
amh.newModel("TARGET", " file://home/barri/workspace-grecco/LabApplication/Target.uml",
metaModel);

outputModel.setIsTarget(true);
libraries.put("LIB", new
URL("file:/home/barri/workspace/GReCCo/helpers_plugin.asm"));
models.put("CONCERN1", concern1);
models.put("CONCERN2", concern2);
models.put("MAPPING", mapping);
models.put("UML", metaModel);
models.put("TARGET", outputModel);
URL tf = new URL("file:/home/barri/workspace/GReCCo/grecco_plugin.asm");

AtlLauncher.getDefault().launch(tf, libraries, models,
Collections.EMPTY_MAP, new ArrayList(), Collections.EMPTY_MAP);


What I mean about oclistypeof and ocliskindof is the following:

rule class2class {
from i : UML!Class (
thisModule.elementsToCopy()->includes(i)
)
to o : UML!Class mapsTo i
(
}
do
{
if(o.oclIsTypeOf(UML!Class)
print('something')
thisModule.model.packagedElement <- o;
}
}

when i launch the atl like this there is never output. if i use ocliskindof
instead, there is always output.


Quentin Glineur wrote:

> Answer follows up.
>
> Aram Hovsepyan a écrit :
>> Hi,
>>
>> I think my UML metamodel is loaded fine.
>
> Sorry to insist but what make you think so? (Can you give excerpt of
> your code?) The metamodel is not loaded fine if it's metamodel is not
> properly loaded.
>>
>> Somehow the check with oclIsKindOf(UML!Class) does work. I am not
>> familiar
>> with the internals of ATL but if it uses also internally the oclIsTypeOf
>> to match the context of a helper this might be the whole problem.
>>
>
> No, oclIskindOf does not use oclIsTypeOf! It should come from somewhere
> else!
>
>
>>
>> Quentin Glineur wrote:
>>
>>> Hi, you may have a look inside the QVT Relations source code (from the
>>> CVS).
>>>
>>> The RelationsCompiler has quite an easy code to launch a transformation.
>>>
>>> Regards,
>>>
>>> Quentin
>>>
>>> Aram Hovsepyan a écrit :
>>>> Hi,
>>>>
>>>> I managed to limit the scope of the problem. Here is a sample
>>>> rule
>>>> -- Rule to copy classes
>>>> rule class2class {
>>>> from i : UML!Class (
>>>> thisModule.elementsToCopy()->includes(i)
>>>> )
>>>> to o : UML!Class mapsTo i
>>>> (
>>>> name <- i.name,
>>>> )
>>>> do
>>>> {
>>>> if(o.oclIsTypeOf(UML!Class))
>>>> 'type is recognized'.println();
>>>> else
>>>> 'should not happen'.println();
>>>> }
>>>> }
>>>>
>>>> When invoked manually i get of course the type is recognized message.
>>>> When invoked programmatically i get the 'should not happen' output.
>>>>
>>>> Help is really appreciated.
>>>> Thnx
>>>>
>>>>
>>>> Aram Hovsepyan wrote:
>>>>
>>>>> Hey Quentin,
>>>>>
>>>>> How can I check on that? I think you are right. Somehow the
>>>>> UML metamodel
>>>>> is not loaded correctly. In some other helper functions I have a check
>>>>> oclIsTypeOf(UML!Class) and it returns false while manual invokation
>>>>> results in true.
>>>>> The UML metamodel is loaded though because i tried changing
>>>>> some paths and
>>>>> ATL then starts giving NullPointer exceptions.
>>>>>
>>>>> I would appreciate if you could send me the code samples you
>>>>> use to startup
>>>>> the atl code. I'm using a 3rd party written AtlStarter and its not
>>>>> very clear to me.
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Regards,
>>>>> Aram.
>>>>>
>>>>> Quentin Glineur wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>>>> programmatic launching?
>>>>>>
>>>>>> (I had a similar problem for MOF)
>>>>>>
>>>>>> Quentin GLINEUR
>>>>>>
>>>>>> Aram Hovsepyan a écrit :
>>>>>>> Hey guys,
>>>>>>>
>>>>>>> Could anyone tell me at least if I should bother looking
>>>>>>> into some errors
>>>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>>>
>>>>>>> To remind - my transformation works perfectly when i invoke
>>>>>>> it manually.
>>>>>>> When i call it programmatically from my plugin it gives an error.
>>>>>>>
>>>>>>> thnx
>>>>>>>
>>>>>>> Aram Hovsepyan wrote:
>>>>>>>
>>>>>>>> Hi guys,
>>>>>>>>
>>>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>>>> When I launch my ATL transformation manually it works
>>>>>>>> perfectly well
>>>>>>>> without any errors.
>>>>>>>>
>>>>>>>> Launching the same whole with the correct paths etc
>>>>>>>> produces errors like:
>>>>>>>>
>>>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>>>> [OclAny]
>>>>>>>> (including Java operations)
>>>>>>>>
>>>>>>>> Here is a header of this operation:
>>>>>>>>
>>>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>>>
>>>>>>>> My guess is that the problem is with this context. When i
>>>>>>>> replace the
>>>>>>>> function inline it stops complaining.
>>>>>>>>
>>>>>>>> thanks in advance.
>>>>>>>> Regards,
>>>>>>>> Aram Hovsepyan.
>>
>
> Regards,
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #76060 is a reply to message #75976] Thu, 06 March 2008 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------070801000400090201050902
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

How do get the AtlModelHandler? i.e. what does getDefaultHandler() do?

Regards

Aram Hovsepyan a écrit :
> Hi Quentin,
>
> Here is an excerpt from my code where i launch the transformation with some
> input models.
>
> Map<String, ASMModel> models = new HashMap<String, ASMModel>();
> HashMap<String, URL> libraries = new HashMap<String, URL>();
> AtlModelHandler amh = getDefaultHandler();
> ASMModel metaModel = ((AtlUML2ModelHandler) amh).loadModel("UML",
> amh.getMof(), "uri:http://www.eclipse.org/uml2/2.1.0/UML");
>
> ASMModel concern1 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN1",
> metaModel,
> URI.createURI(" file://home/barri/workspace-grecco/LabApplication/lab_applic ation.uml"));
>
> ASMModel concern2 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN2",
> metaModel,
> URI.createURI(" file://home/barri/workspace/org.kuleuven.grecco_view/concern _library/application_firewall.uml"));
>
> ASMModel mapping = ((AtlUML2ModelHandler)amh).loadModel("MAPPING",
> metaModel,
> URI.createURI(" file://home/barri/workspace-grecco/LabApplication/Mapping.um l"));
>
> ASMModel outputModel =
> amh.newModel("TARGET", " file://home/barri/workspace-grecco/LabApplication/Target.uml",
> metaModel);
>
> outputModel.setIsTarget(true);
> libraries.put("LIB", new
> URL("file:/home/barri/workspace/GReCCo/helpers_plugin.asm"));
> models.put("CONCERN1", concern1);
> models.put("CONCERN2", concern2);
> models.put("MAPPING", mapping);
> models.put("UML", metaModel);
> models.put("TARGET", outputModel);
> URL tf = new URL("file:/home/barri/workspace/GReCCo/grecco_plugin.asm");
>
> AtlLauncher.getDefault().launch(tf, libraries, models,
> Collections.EMPTY_MAP, new ArrayList(), Collections.EMPTY_MAP);
>
>
> What I mean about oclistypeof and ocliskindof is the following:
>
> rule class2class {
> from i : UML!Class (
> thisModule.elementsToCopy()->includes(i)
> )
> to o : UML!Class mapsTo i
> (
> }
> do
> {
> if(o.oclIsTypeOf(UML!Class)
> print('something')
> thisModule.model.packagedElement <- o;
> }
> }
>
> when i launch the atl like this there is never output. if i use ocliskindof
> instead, there is always output.
>
>
> Quentin Glineur wrote:
>
>> Answer follows up.
>>
>> Aram Hovsepyan a écrit :
>>> Hi,
>>>
>>> I think my UML metamodel is loaded fine.
>> Sorry to insist but what make you think so? (Can you give excerpt of
>> your code?) The metamodel is not loaded fine if it's metamodel is not
>> properly loaded.
>>> Somehow the check with oclIsKindOf(UML!Class) does work. I am not
>>> familiar
>>> with the internals of ATL but if it uses also internally the oclIsTypeOf
>>> to match the context of a helper this might be the whole problem.
>>>
>> No, oclIskindOf does not use oclIsTypeOf! It should come from somewhere
>> else!
>>
>>
>>> Quentin Glineur wrote:
>>>
>>>> Hi, you may have a look inside the QVT Relations source code (from the
>>>> CVS).
>>>>
>>>> The RelationsCompiler has quite an easy code to launch a transformation.
>>>>
>>>> Regards,
>>>>
>>>> Quentin
>>>>
>>>> Aram Hovsepyan a écrit :
>>>>> Hi,
>>>>>
>>>>> I managed to limit the scope of the problem. Here is a sample
>>>>> rule
>>>>> -- Rule to copy classes
>>>>> rule class2class {
>>>>> from i : UML!Class (
>>>>> thisModule.elementsToCopy()->includes(i)
>>>>> )
>>>>> to o : UML!Class mapsTo i
>>>>> (
>>>>> name <- i.name,
>>>>> )
>>>>> do
>>>>> {
>>>>> if(o.oclIsTypeOf(UML!Class))
>>>>> 'type is recognized'.println();
>>>>> else
>>>>> 'should not happen'.println();
>>>>> }
>>>>> }
>>>>>
>>>>> When invoked manually i get of course the type is recognized message.
>>>>> When invoked programmatically i get the 'should not happen' output.
>>>>>
>>>>> Help is really appreciated.
>>>>> Thnx
>>>>>
>>>>>
>>>>> Aram Hovsepyan wrote:
>>>>>
>>>>>> Hey Quentin,
>>>>>>
>>>>>> How can I check on that? I think you are right. Somehow the
>>>>>> UML metamodel
>>>>>> is not loaded correctly. In some other helper functions I have a check
>>>>>> oclIsTypeOf(UML!Class) and it returns false while manual invokation
>>>>>> results in true.
>>>>>> The UML metamodel is loaded though because i tried changing
>>>>>> some paths and
>>>>>> ATL then starts giving NullPointer exceptions.
>>>>>>
>>>>>> I would appreciate if you could send me the code samples you
>>>>>> use to startup
>>>>>> the atl code. I'm using a 3rd party written AtlStarter and its not
>>>>>> very clear to me.
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Regards,
>>>>>> Aram.
>>>>>>
>>>>>> Quentin Glineur wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>>>>> programmatic launching?
>>>>>>>
>>>>>>> (I had a similar problem for MOF)
>>>>>>>
>>>>>>> Quentin GLINEUR
>>>>>>>
>>>>>>> Aram Hovsepyan a écrit :
>>>>>>>> Hey guys,
>>>>>>>>
>>>>>>>> Could anyone tell me at least if I should bother looking
>>>>>>>> into some errors
>>>>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>>>>
>>>>>>>> To remind - my transformation works perfectly when i invoke
>>>>>>>> it manually.
>>>>>>>> When i call it programmatically from my plugin it gives an error.
>>>>>>>>
>>>>>>>> thnx
>>>>>>>>
>>>>>>>> Aram Hovsepyan wrote:
>>>>>>>>
>>>>>>>>> Hi guys,
>>>>>>>>>
>>>>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>>>>> When I launch my ATL transformation manually it works
>>>>>>>>> perfectly well
>>>>>>>>> without any errors.
>>>>>>>>>
>>>>>>>>> Launching the same whole with the correct paths etc
>>>>>>>>> produces errors like:
>>>>>>>>>
>>>>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>>>>> [OclAny]
>>>>>>>>> (including Java operations)
>>>>>>>>>
>>>>>>>>> Here is a header of this operation:
>>>>>>>>>
>>>>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>>>>
>>>>>>>>> My guess is that the problem is with this context. When i
>>>>>>>>> replace the
>>>>>>>>> function inline it stops complaining.
>>>>>>>>>
>>>>>>>>> thanks in advance.
>>>>>>>>> Regards,
>>>>>>>>> Aram Hovsepyan.
>> Regards,
>


--------------070801000400090201050902
Content-Type: text/x-vcard; charset=utf-8;
name="quentin_glineur.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="quentin_glineur.vcf"

YmVnaW46dmNhcmQNCmZuOlF1ZW50aW4gR0xJTkVVUg0KbjpHTElORVVSO1F1 ZW50aW4NCm9y
ZzpPYmVvIC0gTW9kZWwgRHJpdmVuIENvbXBhbnk7UmVzZWFyY2ggYW5kIERl dmVsb3BtZW50
DQphZHI7cXVvdGVkLXByaW50YWJsZTo7OzIgcnVlIFJvYmVydCBTY2h1bWFu bjtSZXo9QzM9
QTk7OzQ0NDAwO0ZyYW5jZQ0KZW1haWw7aW50ZXJuZXQ6cXVlbnRpbi5nbGlu ZXVyQG9iZW8u
ZnINCnRpdGxlOk1EQSBDb25zdWx0YW50DQp0ZWw7d29yazorMzMyIDUxIDEz IDU0IDE4DQp4
LW1vemlsbGEtaHRtbDpUUlVFDQp1cmw6aHR0cDovL3d3dy5vYmVvLmZyDQp2 ZXJzaW9uOjIu
MQ0KZW5kOnZjYXJkDQoNCg==
--------------070801000400090201050902--
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #76076 is a reply to message #76060] Thu, 06 March 2008 12:31 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
a yea, i forgot. here is the piece:

public static AtlModelHandler getDefaultHandler()
{
AtlModelHandler amh = AtlUML2ModelHandler.getDefault("UML2");
return amh;
}

regards,
Aram.

Quentin Glineur wrote:

> Hi,
>
> How do get the AtlModelHandler? i.e. what does getDefaultHandler() do?
>
> Regards
>
> Aram Hovsepyan a écrit :
>> Hi Quentin,
>>
>> Here is an excerpt from my code where i launch the transformation
>> with some
>> input models.
>>
>> Map<String, ASMModel> models = new HashMap<String, ASMModel>();
>> HashMap<String, URL> libraries = new HashMap<String, URL>();
>> AtlModelHandler amh = getDefaultHandler();
>> ASMModel metaModel = ((AtlUML2ModelHandler) amh).loadModel("UML",
>> amh.getMof(), "uri:http://www.eclipse.org/uml2/2.1.0/UML");
>>
>> ASMModel concern1 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN1",
>> metaModel,
>>
URI.createURI(" file://home/barri/workspace-grecco/LabApplication/lab_applic ation.uml"));
>>
>> ASMModel concern2 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN2",
>> metaModel,
>>
URI.createURI(" file://home/barri/workspace/org.kuleuven.grecco_view/concern _library/application_firewall.uml"));
>>
>> ASMModel mapping = ((AtlUML2ModelHandler)amh).loadModel("MAPPING",
>> metaModel,
>>
URI.createURI(" file://home/barri/workspace-grecco/LabApplication/Mapping.um l"));
>>
>> ASMModel outputModel =
>> amh.newModel("TARGET",
>> " file://home/barri/workspace-grecco/LabApplication/Target.uml",
>> metaModel);
>>
>> outputModel.setIsTarget(true);
>> libraries.put("LIB", new
>> URL("file:/home/barri/workspace/GReCCo/helpers_plugin.asm"));
>> models.put("CONCERN1", concern1);
>> models.put("CONCERN2", concern2);
>> models.put("MAPPING", mapping);
>> models.put("UML", metaModel);
>> models.put("TARGET", outputModel);
>> URL tf = new URL("file:/home/barri/workspace/GReCCo/grecco_plugin.asm");
>>
>> AtlLauncher.getDefault().launch(tf, libraries, models,
>> Collections.EMPTY_MAP, new ArrayList(), Collections.EMPTY_MAP);
>>
>>
>> What I mean about oclistypeof and ocliskindof is the following:
>>
>> rule class2class {
>> from i : UML!Class (
>> thisModule.elementsToCopy()->includes(i)
>> )
>> to o : UML!Class mapsTo i
>> (
>> }
>> do
>> {
>> if(o.oclIsTypeOf(UML!Class)
>> print('something')
>> thisModule.model.packagedElement <- o;
>> }
>> }
>>
>> when i launch the atl like this there is never output. if i use
>> ocliskindof
>> instead, there is always output.
>>
>>
>> Quentin Glineur wrote:
>>
>>> Answer follows up.
>>>
>>> Aram Hovsepyan a écrit :
>>>> Hi,
>>>>
>>>> I think my UML metamodel is loaded fine.
>>> Sorry to insist but what make you think so? (Can you give excerpt of
>>> your code?) The metamodel is not loaded fine if it's metamodel is not
>>> properly loaded.
>>>> Somehow the check with oclIsKindOf(UML!Class) does work. I am
>>>> not familiar
>>>> with the internals of ATL but if it uses also internally the
>>>> oclIsTypeOf to match the context of a helper this might be the whole
>>>> problem.
>>>>
>>> No, oclIskindOf does not use oclIsTypeOf! It should come from somewhere
>>> else!
>>>
>>>
>>>> Quentin Glineur wrote:
>>>>
>>>>> Hi, you may have a look inside the QVT Relations source code (from the
>>>>> CVS).
>>>>>
>>>>> The RelationsCompiler has quite an easy code to launch a
>>>>> transformation.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Quentin
>>>>>
>>>>> Aram Hovsepyan a écrit :
>>>>>> Hi,
>>>>>>
>>>>>> I managed to limit the scope of the problem. Here is a sample
>>>>>> rule
>>>>>> -- Rule to copy classes
>>>>>> rule class2class {
>>>>>> from i : UML!Class (
>>>>>> thisModule.elementsToCopy()->includes(i)
>>>>>> )
>>>>>> to o : UML!Class mapsTo i
>>>>>> (
>>>>>> name <- i.name,
>>>>>> )
>>>>>> do
>>>>>> {
>>>>>> if(o.oclIsTypeOf(UML!Class))
>>>>>> 'type is recognized'.println();
>>>>>> else
>>>>>> 'should not happen'.println();
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> When invoked manually i get of course the type is recognized message.
>>>>>> When invoked programmatically i get the 'should not happen' output.
>>>>>>
>>>>>> Help is really appreciated.
>>>>>> Thnx
>>>>>>
>>>>>>
>>>>>> Aram Hovsepyan wrote:
>>>>>>
>>>>>>> Hey Quentin,
>>>>>>>
>>>>>>> How can I check on that? I think you are right. Somehow the
>>>>>>> UML metamodel
>>>>>>> is not loaded correctly. In some other helper functions I have a
>>>>>>> check oclIsTypeOf(UML!Class) and it returns false while manual
>>>>>>> invokation results in true.
>>>>>>> The UML metamodel is loaded though because i tried changing
>>>>>>> some paths and
>>>>>>> ATL then starts giving NullPointer exceptions.
>>>>>>>
>>>>>>> I would appreciate if you could send me the code samples you
>>>>>>> use to startup
>>>>>>> the atl code. I'm using a 3rd party written AtlStarter and its not
>>>>>>> very clear to me.
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Aram.
>>>>>>>
>>>>>>> Quentin Glineur wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>>>>>> programmatic launching?
>>>>>>>>
>>>>>>>> (I had a similar problem for MOF)
>>>>>>>>
>>>>>>>> Quentin GLINEUR
>>>>>>>>
>>>>>>>> Aram Hovsepyan a écrit :
>>>>>>>>> Hey guys,
>>>>>>>>>
>>>>>>>>> Could anyone tell me at least if I should bother looking
>>>>>>>>> into some errors
>>>>>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>>>>>
>>>>>>>>> To remind - my transformation works perfectly when i
>>>>>>>>> invoke it manually.
>>>>>>>>> When i call it programmatically from my plugin it gives an error.
>>>>>>>>>
>>>>>>>>> thnx
>>>>>>>>>
>>>>>>>>> Aram Hovsepyan wrote:
>>>>>>>>>
>>>>>>>>>> Hi guys,
>>>>>>>>>>
>>>>>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>>>>>> When I launch my ATL transformation manually it works
>>>>>>>>>> perfectly well
>>>>>>>>>> without any errors.
>>>>>>>>>>
>>>>>>>>>> Launching the same whole with the correct paths etc
>>>>>>>>>> produces errors like:
>>>>>>>>>>
>>>>>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>>>>>> [OclAny]
>>>>>>>>>> (including Java operations)
>>>>>>>>>>
>>>>>>>>>> Here is a header of this operation:
>>>>>>>>>>
>>>>>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>>>>>
>>>>>>>>>> My guess is that the problem is with this context. When i
>>>>>>>>>> replace the
>>>>>>>>>> function inline it stops complaining.
>>>>>>>>>>
>>>>>>>>>> thanks in advance.
>>>>>>>>>> Regards,
>>>>>>>>>> Aram Hovsepyan.
>>> Regards,
>>
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #76093 is a reply to message #76076] Fri, 07 March 2008 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------090402050904020000070003
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Aram,

I think that your model handler may have no registry (MOF) instanciated.
Indeed, the method createMOF() is called in the AtlUML2ModelHandler
constructor.

Try to use an AtlUML2ModelHandler instanciated by:

AtlUML2ModelHandler aumh = new AtlUML2ModelHandler()

Regards,

Quentin

Aram Hovsepyan a écrit :
> a yea, i forgot. here is the piece:
>
> public static AtlModelHandler getDefaultHandler()
> {
> AtlModelHandler amh = AtlUML2ModelHandler.getDefault("UML2");
> return amh;
> }
>
> regards,
> Aram.
>
> Quentin Glineur wrote:
>
>> Hi,
>>
>> How do get the AtlModelHandler? i.e. what does getDefaultHandler() do?
>>
>> Regards
>>
>> Aram Hovsepyan a écrit :
>>> Hi Quentin,
>>>
>>> Here is an excerpt from my code where i launch the transformation
>>> with some
>>> input models.
>>>
>>> Map<String, ASMModel> models = new HashMap<String, ASMModel>();
>>> HashMap<String, URL> libraries = new HashMap<String, URL>();
>>> AtlModelHandler amh = getDefaultHandler();
>>> ASMModel metaModel = ((AtlUML2ModelHandler) amh).loadModel("UML",
>>> amh.getMof(), "uri:http://www.eclipse.org/uml2/2.1.0/UML");
>>>
>>> ASMModel concern1 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN1",
>>> metaModel,
>>>
> URI.createURI(" file://home/barri/workspace-grecco/LabApplication/lab_applic ation.uml"));
>>> ASMModel concern2 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN2",
>>> metaModel,
>>>
> URI.createURI(" file://home/barri/workspace/org.kuleuven.grecco_view/concern _library/application_firewall.uml"));
>>> ASMModel mapping = ((AtlUML2ModelHandler)amh).loadModel("MAPPING",
>>> metaModel,
>>>
> URI.createURI(" file://home/barri/workspace-grecco/LabApplication/Mapping.um l"));
>>> ASMModel outputModel =
>>> amh.newModel("TARGET",
>>> " file://home/barri/workspace-grecco/LabApplication/Target.uml",
>>> metaModel);
>>>
>>> outputModel.setIsTarget(true);
>>> libraries.put("LIB", new
>>> URL("file:/home/barri/workspace/GReCCo/helpers_plugin.asm"));
>>> models.put("CONCERN1", concern1);
>>> models.put("CONCERN2", concern2);
>>> models.put("MAPPING", mapping);
>>> models.put("UML", metaModel);
>>> models.put("TARGET", outputModel);
>>> URL tf = new URL("file:/home/barri/workspace/GReCCo/grecco_plugin.asm");
>>>
>>> AtlLauncher.getDefault().launch(tf, libraries, models,
>>> Collections.EMPTY_MAP, new ArrayList(), Collections.EMPTY_MAP);
>>>
>>>
>>> What I mean about oclistypeof and ocliskindof is the following:
>>>
>>> rule class2class {
>>> from i : UML!Class (
>>> thisModule.elementsToCopy()->includes(i)
>>> )
>>> to o : UML!Class mapsTo i
>>> (
>>> }
>>> do
>>> {
>>> if(o.oclIsTypeOf(UML!Class)
>>> print('something')
>>> thisModule.model.packagedElement <- o;
>>> }
>>> }
>>>
>>> when i launch the atl like this there is never output. if i use
>>> ocliskindof
>>> instead, there is always output.
>>>
>>>
>>> Quentin Glineur wrote:
>>>
>>>> Answer follows up.
>>>>
>>>> Aram Hovsepyan a écrit :
>>>>> Hi,
>>>>>
>>>>> I think my UML metamodel is loaded fine.
>>>> Sorry to insist but what make you think so? (Can you give excerpt of
>>>> your code?) The metamodel is not loaded fine if it's metamodel is not
>>>> properly loaded.
>>>>> Somehow the check with oclIsKindOf(UML!Class) does work. I am
>>>>> not familiar
>>>>> with the internals of ATL but if it uses also internally the
>>>>> oclIsTypeOf to match the context of a helper this might be the whole
>>>>> problem.
>>>>>
>>>> No, oclIskindOf does not use oclIsTypeOf! It should come from somewhere
>>>> else!
>>>>
>>>>
>>>>> Quentin Glineur wrote:
>>>>>
>>>>>> Hi, you may have a look inside the QVT Relations source code (from the
>>>>>> CVS).
>>>>>>
>>>>>> The RelationsCompiler has quite an easy code to launch a
>>>>>> transformation.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Quentin
>>>>>>
>>>>>> Aram Hovsepyan a écrit :
>>>>>>> Hi,
>>>>>>>
>>>>>>> I managed to limit the scope of the problem. Here is a sample
>>>>>>> rule
>>>>>>> -- Rule to copy classes
>>>>>>> rule class2class {
>>>>>>> from i : UML!Class (
>>>>>>> thisModule.elementsToCopy()->includes(i)
>>>>>>> )
>>>>>>> to o : UML!Class mapsTo i
>>>>>>> (
>>>>>>> name <- i.name,
>>>>>>> )
>>>>>>> do
>>>>>>> {
>>>>>>> if(o.oclIsTypeOf(UML!Class))
>>>>>>> 'type is recognized'.println();
>>>>>>> else
>>>>>>> 'should not happen'.println();
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> When invoked manually i get of course the type is recognized message.
>>>>>>> When invoked programmatically i get the 'should not happen' output.
>>>>>>>
>>>>>>> Help is really appreciated.
>>>>>>> Thnx
>>>>>>>
>>>>>>>
>>>>>>> Aram Hovsepyan wrote:
>>>>>>>
>>>>>>>> Hey Quentin,
>>>>>>>>
>>>>>>>> How can I check on that? I think you are right. Somehow the
>>>>>>>> UML metamodel
>>>>>>>> is not loaded correctly. In some other helper functions I have a
>>>>>>>> check oclIsTypeOf(UML!Class) and it returns false while manual
>>>>>>>> invokation results in true.
>>>>>>>> The UML metamodel is loaded though because i tried changing
>>>>>>>> some paths and
>>>>>>>> ATL then starts giving NullPointer exceptions.
>>>>>>>>
>>>>>>>> I would appreciate if you could send me the code samples you
>>>>>>>> use to startup
>>>>>>>> the atl code. I'm using a 3rd party written AtlStarter and its not
>>>>>>>> very clear to me.
>>>>>>>>
>>>>>>>> Thanks in advance.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Aram.
>>>>>>>>
>>>>>>>> Quentin Glineur wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>>>>>>> programmatic launching?
>>>>>>>>>
>>>>>>>>> (I had a similar problem for MOF)
>>>>>>>>>
>>>>>>>>> Quentin GLINEUR
>>>>>>>>>
>>>>>>>>> Aram Hovsepyan a écrit :
>>>>>>>>>> Hey guys,
>>>>>>>>>>
>>>>>>>>>> Could anyone tell me at least if I should bother looking
>>>>>>>>>> into some errors
>>>>>>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>>>>>>
>>>>>>>>>> To remind - my transformation works perfectly when i
>>>>>>>>>> invoke it manually.
>>>>>>>>>> When i call it programmatically from my plugin it gives an error.
>>>>>>>>>>
>>>>>>>>>> thnx
>>>>>>>>>>
>>>>>>>>>> Aram Hovsepyan wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi guys,
>>>>>>>>>>>
>>>>>>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>>>>>>> When I launch my ATL transformation manually it works
>>>>>>>>>>> perfectly well
>>>>>>>>>>> without any errors.
>>>>>>>>>>>
>>>>>>>>>>> Launching the same whole with the correct paths etc
>>>>>>>>>>> produces errors like:
>>>>>>>>>>>
>>>>>>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>>>>>>> [OclAny]
>>>>>>>>>>> (including Java operations)
>>>>>>>>>>>
>>>>>>>>>>> Here is a header of this operation:
>>>>>>>>>>>
>>>>>>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>>>>>>
>>>>>>>>>>> My guess is that the problem is with this context. When i
>>>>>>>>>>> replace the
>>>>>>>>>>> function inline it stops complaining.
>>>>>>>>>>>
>>>>>>>>>>> thanks in advance.
>>>>>>>>>>> Regards,
>>>>>>>>>>> Aram Hovsepyan.
>>>> Regards,
>


--------------090402050904020000070003
Content-Type: text/x-vcard; charset=utf-8;
name="quentin_glineur.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="quentin_glineur.vcf"

YmVnaW46dmNhcmQNCmZuOlF1ZW50aW4gR0xJTkVVUg0KbjpHTElORVVSO1F1 ZW50aW4NCm9y
ZzpPYmVvIC0gTW9kZWwgRHJpdmVuIENvbXBhbnk7UmVzZWFyY2ggYW5kIERl dmVsb3BtZW50
DQphZHI7cXVvdGVkLXByaW50YWJsZTo7OzIgcnVlIFJvYmVydCBTY2h1bWFu bjtSZXo9QzM9
QTk7OzQ0NDAwO0ZyYW5jZQ0KZW1haWw7aW50ZXJuZXQ6cXVlbnRpbi5nbGlu ZXVyQG9iZW8u
ZnINCnRpdGxlOk1EQSBDb25zdWx0YW50DQp0ZWw7d29yazorMzMyIDUxIDEz IDU0IDE4DQp4
LW1vemlsbGEtaHRtbDpUUlVFDQp1cmw6aHR0cDovL3d3dy5vYmVvLmZyDQp2 ZXJzaW9uOjIu
MQ0KZW5kOnZjYXJkDQoNCg==
--------------090402050904020000070003--
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #76111 is a reply to message #76093] Fri, 07 March 2008 10:26 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hi Quentin,

Thanks for the reply but it doesn't help. I've changed the method
implementation to
amh = new AtlUML2ModelHandler();

but still the same errors. Types are somehow not recognized. Only
oclIsKindOf recognizes the types.

I've managed to create a workaround by using formal parameters in all my
atl helpers instead of using context variables.

Any other ideas? I have to give a demo next thursday and a fix by then
would be more than appreciated.

Regards,
Aram.


Quentin Glineur wrote:

> Hi Aram,
>
> I think that your model handler may have no registry (MOF) instanciated.
> Indeed, the method createMOF() is called in the AtlUML2ModelHandler
> constructor.
>
> Try to use an AtlUML2ModelHandler instanciated by:
>
> AtlUML2ModelHandler aumh = new AtlUML2ModelHandler()
>
> Regards,
>
> Quentin
>
> Aram Hovsepyan a écrit :
>> a yea, i forgot. here is the piece:
>>
>> public static AtlModelHandler getDefaultHandler()
>> {
>> AtlModelHandler amh =
>> AtlUML2ModelHandler.getDefault("UML2"); return amh;
>> }
>>
>> regards,
>> Aram.
>>
>> Quentin Glineur wrote:
>>
>>> Hi,
>>>
>>> How do get the AtlModelHandler? i.e. what does getDefaultHandler() do?
>>>
>>> Regards
>>>
>>> Aram Hovsepyan a écrit :
>>>> Hi Quentin,
>>>>
>>>> Here is an excerpt from my code where i launch the
>>>> transformation with some
>>>> input models.
>>>>
>>>> Map<String, ASMModel> models = new HashMap<String, ASMModel>();
>>>> HashMap<String, URL> libraries = new HashMap<String, URL>();
>>>> AtlModelHandler amh = getDefaultHandler();
>>>> ASMModel metaModel = ((AtlUML2ModelHandler) amh).loadModel("UML",
>>>> amh.getMof(), "uri:http://www.eclipse.org/uml2/2.1.0/UML");
>>>>
>>>> ASMModel concern1 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN1",
>>>> metaModel,
>>>>
>>
URI.createURI(" file://home/barri/workspace-grecco/LabApplication/lab_applic ation.uml"));
>>>> ASMModel concern2 = ((AtlUML2ModelHandler)amh).loadModel("CONCERN2",
>>>> metaModel,
>>>>
>>
URI.createURI(" file://home/barri/workspace/org.kuleuven.grecco_view/concern _library/application_firewall.uml"));
>>>> ASMModel mapping = ((AtlUML2ModelHandler)amh).loadModel("MAPPING",
>>>> metaModel,
>>>>
>>
URI.createURI(" file://home/barri/workspace-grecco/LabApplication/Mapping.um l"));
>>>> ASMModel outputModel =
>>>> amh.newModel("TARGET",
>>>> " file://home/barri/workspace-grecco/LabApplication/Target.uml",
>>>> metaModel);
>>>>
>>>> outputModel.setIsTarget(true);
>>>> libraries.put("LIB", new
>>>> URL("file:/home/barri/workspace/GReCCo/helpers_plugin.asm"));
>>>> models.put("CONCERN1", concern1);
>>>> models.put("CONCERN2", concern2);
>>>> models.put("MAPPING", mapping);
>>>> models.put("UML", metaModel);
>>>> models.put("TARGET", outputModel);
>>>> URL tf = new
>>>> URL("file:/home/barri/workspace/GReCCo/grecco_plugin.asm");
>>>>
>>>> AtlLauncher.getDefault().launch(tf, libraries, models,
>>>> Collections.EMPTY_MAP, new ArrayList(), Collections.EMPTY_MAP);
>>>>
>>>>
>>>> What I mean about oclistypeof and ocliskindof is the following:
>>>>
>>>> rule class2class {
>>>> from i : UML!Class (
>>>> thisModule.elementsToCopy()->includes(i)
>>>> )
>>>> to o : UML!Class mapsTo i
>>>> (
>>>> }
>>>> do
>>>> {
>>>> if(o.oclIsTypeOf(UML!Class)
>>>> print('something')
>>>> thisModule.model.packagedElement <- o;
>>>> }
>>>> }
>>>>
>>>> when i launch the atl like this there is never output. if i use
>>>> ocliskindof
>>>> instead, there is always output.
>>>>
>>>>
>>>> Quentin Glineur wrote:
>>>>
>>>>> Answer follows up.
>>>>>
>>>>> Aram Hovsepyan a écrit :
>>>>>> Hi,
>>>>>>
>>>>>> I think my UML metamodel is loaded fine.
>>>>> Sorry to insist but what make you think so? (Can you give excerpt of
>>>>> your code?) The metamodel is not loaded fine if it's metamodel is not
>>>>> properly loaded.
>>>>>> Somehow the check with oclIsKindOf(UML!Class) does work. I am
>>>>>> not familiar
>>>>>> with the internals of ATL but if it uses also internally the
>>>>>> oclIsTypeOf to match the context of a helper this might be the whole
>>>>>> problem.
>>>>>>
>>>>> No, oclIskindOf does not use oclIsTypeOf! It should come from
>>>>> somewhere else!
>>>>>
>>>>>
>>>>>> Quentin Glineur wrote:
>>>>>>
>>>>>>> Hi, you may have a look inside the QVT Relations source code (from
>>>>>>> the CVS).
>>>>>>>
>>>>>>> The RelationsCompiler has quite an easy code to launch a
>>>>>>> transformation.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Quentin
>>>>>>>
>>>>>>> Aram Hovsepyan a écrit :
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I managed to limit the scope of the problem. Here is a
>>>>>>>> sample rule
>>>>>>>> -- Rule to copy classes
>>>>>>>> rule class2class {
>>>>>>>> from i : UML!Class (
>>>>>>>> thisModule.elementsToCopy()->includes(i)
>>>>>>>> )
>>>>>>>> to o : UML!Class mapsTo i
>>>>>>>> (
>>>>>>>> name <- i.name,
>>>>>>>> )
>>>>>>>> do
>>>>>>>> {
>>>>>>>> if(o.oclIsTypeOf(UML!Class))
>>>>>>>> 'type is recognized'.println();
>>>>>>>> else
>>>>>>>> 'should not happen'.println();
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>> When invoked manually i get of course the type is recognized
>>>>>>>> message. When invoked programmatically i get the 'should not
>>>>>>>> happen' output.
>>>>>>>>
>>>>>>>> Help is really appreciated.
>>>>>>>> Thnx
>>>>>>>>
>>>>>>>>
>>>>>>>> Aram Hovsepyan wrote:
>>>>>>>>
>>>>>>>>> Hey Quentin,
>>>>>>>>>
>>>>>>>>> How can I check on that? I think you are right. Somehow
>>>>>>>>> the UML metamodel
>>>>>>>>> is not loaded correctly. In some other helper functions I have a
>>>>>>>>> check oclIsTypeOf(UML!Class) and it returns false while manual
>>>>>>>>> invokation results in true.
>>>>>>>>> The UML metamodel is loaded though because i tried
>>>>>>>>> changing some paths and
>>>>>>>>> ATL then starts giving NullPointer exceptions.
>>>>>>>>>
>>>>>>>>> I would appreciate if you could send me the code samples
>>>>>>>>> you use to startup
>>>>>>>>> the atl code. I'm using a 3rd party written AtlStarter and its not
>>>>>>>>> very clear to me.
>>>>>>>>>
>>>>>>>>> Thanks in advance.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Aram.
>>>>>>>>>
>>>>>>>>> Quentin Glineur wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Are you sure that the UML metamodel is correctly loaded by your
>>>>>>>>>> programmatic launching?
>>>>>>>>>>
>>>>>>>>>> (I had a similar problem for MOF)
>>>>>>>>>>
>>>>>>>>>> Quentin GLINEUR
>>>>>>>>>>
>>>>>>>>>> Aram Hovsepyan a écrit :
>>>>>>>>>>> Hey guys,
>>>>>>>>>>>
>>>>>>>>>>> Could anyone tell me at least if I should bother looking
>>>>>>>>>>> into some errors
>>>>>>>>>>> in my AtlStarter or should I just wait for a bug fix?
>>>>>>>>>>>
>>>>>>>>>>> To remind - my transformation works perfectly when i
>>>>>>>>>>> invoke it manually.
>>>>>>>>>>> When i call it programmatically from my plugin it gives an
>>>>>>>>>>> error.
>>>>>>>>>>>
>>>>>>>>>>> thnx
>>>>>>>>>>>
>>>>>>>>>>> Aram Hovsepyan wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi guys,
>>>>>>>>>>>>
>>>>>>>>>>>> I have a weird problem here, i'm assuming its a bug.
>>>>>>>>>>>> When I launch my ATL transformation manually it works
>>>>>>>>>>>> perfectly well
>>>>>>>>>>>> without any errors.
>>>>>>>>>>>>
>>>>>>>>>>>> Launching the same whole with the correct paths etc
>>>>>>>>>>>> produces errors like:
>>>>>>>>>>>>
>>>>>>>>>>>> SEVERE: ****** BEGIN Stack Trace
>>>>>>>>>>>> SEVERE: message: ERROR: could not find operation
>>>>>>>>>>>> getTemplateClass on UML!Class having supertypes:
>>>>>>>>>>>> [UML!BehavioredClassifier, UML!EncapsulatedClassifier, OclType,
>>>>>>>>>>>> [OclAny]
>>>>>>>>>>>> (including Java operations)
>>>>>>>>>>>>
>>>>>>>>>>>> Here is a header of this operation:
>>>>>>>>>>>>
>>>>>>>>>>>> helper context UML!Class def: getTemplateClass(): UML!Class
>>>>>>>>>>>>
>>>>>>>>>>>> My guess is that the problem is with this context. When
>>>>>>>>>>>> i replace the
>>>>>>>>>>>> function inline it stops complaining.
>>>>>>>>>>>>
>>>>>>>>>>>> thanks in advance.
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Aram Hovsepyan.
>>>>> Regards,
>>
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #85992 is a reply to message #75662] Mon, 07 July 2008 07:31 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Back to this problem,

Still not solved. This is the cause as pointed out by Quentin, however, I
guess he is not available at the moment.

"The problem seems to come from the UML driver. Indeed, ATL deals with its
own model elements.
When it handles UML elements, it creates ASMUMLModelElement instances. For
those, their supertypes are not registered.
Therefore, as you define operations on their supertypes, the ATL VM is
unable to find the correct operation."

Can I expect a solution in the near future or should I try to solve it
another way?

thnx

Aram Hovsepyan wrote:

> Hi guys,
>
> I have a weird problem here, i'm assuming its a bug.
> When I launch my ATL transformation manually it works perfectly
> well
> without any errors.
>
> Launching the same whole with the correct paths etc produces
> errors like:
>
> SEVERE: ****** BEGIN Stack Trace
> SEVERE: message: ERROR: could not find operation getTemplateClass
> on UML!Class having supertypes: [UML!BehavioredClassifier,
> UML!EncapsulatedClassifier, OclType, OclAny] (including Java operations)
>
> Here is a header of this operation:
>
> helper context UML!Class def: getTemplateClass(): UML!Class
>
> My guess is that the problem is with this context. When i replace
> the
> function inline it stops complaining.
>
> thanks in advance.
> Regards,
> Aram Hovsepyan.

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #86099 is a reply to message #85992] Tue, 08 July 2008 13:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: monnet2.etu.unige.ch

Hello,

I guess I am faced to a similar problem, but working with EMF Ecore meta
models.

I defined an ATL file for doing the union of two meta models based on
Ecore. On the Eclipse ATL plugin all works fine.

My transformation take as inputs:
- the left meta model MOFLeft which conforms to EMF Ecore
- the right meta model MOFRight which conforms to EMF Ecore

And it produces as output a composed meta model (which conforms to EMF
Ecore too) with the union of content of both meta models.

But launching it from Java with the AtlLauncher I get the following error
message (with similar "could not find operation allInstancesFrom on
MOFLeft!EClass having supertypes: [MOFLeft!EClassifier, OclType, OclAny]"
type of message):

Launcher info:
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
SEVERE: ****** BEGIN Stack Trace
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
SEVERE: message: ERROR: could not find operation allInstancesFrom on
MOFLeft!EClass having supertypes: [MOFLeft!EClassifier, OclType, OclAny]
(including Java operations)
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: A.main() : ??#22 null
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: local variables = {self=union_execute_metamodel_transformation :
ASMModule}
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: local stack = []
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: A.__matcher__() : ??#3 null
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: local variables = {self=union_execute_metamodel_transformation :
ASMModule}
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: local stack = []
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: A.__matchCLASSLeft() : ??#9 null
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: local variables = {self=union_execute_metamodel_transformation :
ASMModule}
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
printStackTrace
SEVERE: local stack = [MOFLeft!EClass, Sequence {}]
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
SEVERE: ****** END Stack Trace
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.AtlLauncher launch
SEVERE: ERROR: could not find operation allInstancesFrom on MOFLeft!EClass
having supertypes: [MOFLeft!EClassifier, OclType, OclAny] (including Java
operations)
java.lang.RuntimeException: ERROR: could not find operation
allInstancesFrom on MOFLeft!EClass having supertypes:
[MOFLeft!EClassifier, OclType, OclAny] (including Java operations)
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:195)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:91)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invok e(ASMEMFModelElement.java:700)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
at UnionCOP.process(UnionCOP.java:104)
at MMComposition.process(MMComposition.java:28)
at Main.main(Main.java:47)



Any idea on how to solve this? Thank you in advance for any help.
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #86129 is a reply to message #86099] Tue, 08 July 2008 14:22 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram HovsepyanFriend
Messages: 34
Registered: July 2009
Member
Hey Xavier,

I am not sure you have the same problem. I get errors only with the ATL
operations that I define myself, never with the internal operations such as
allInstancesFrom.

regards,
Aram.

Xavier Monnet wrote:

> Hello,
>
> I guess I am faced to a similar problem, but working with EMF Ecore meta
> models.
>
> I defined an ATL file for doing the union of two meta models based on
> Ecore. On the Eclipse ATL plugin all works fine.
>
> My transformation take as inputs:
> - the left meta model MOFLeft which conforms to EMF Ecore
> - the right meta model MOFRight which conforms to EMF Ecore
>
> And it produces as output a composed meta model (which conforms to EMF
> Ecore too) with the union of content of both meta models.
>
> But launching it from Java with the AtlLauncher I get the following error
> message (with similar "could not find operation allInstancesFrom on
> MOFLeft!EClass having supertypes: [MOFLeft!EClassifier, OclType, OclAny]"
> type of message):
>
> Launcher info:
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
> SEVERE: ****** BEGIN Stack Trace
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
> SEVERE: message: ERROR: could not find operation allInstancesFrom on
> MOFLeft!EClass having supertypes: [MOFLeft!EClassifier, OclType, OclAny]
> (including Java operations)
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: A.main() : ??#22 null
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: local variables = {self=union_execute_metamodel_transformation :
> ASMModule}
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: local stack = []
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: A.__matcher__() : ??#3 null
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: local variables = {self=union_execute_metamodel_transformation :
> ASMModule}
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: local stack = []
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: A.__matchCLASSLeft() : ??#9 null
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: local variables = {self=union_execute_metamodel_transformation :
> ASMModule}
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
> printStackTrace
> SEVERE: local stack = [MOFLeft!EClass, Sequence {}]
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
> SEVERE: ****** END Stack Trace
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
> INFO: Execution terminated due to error (see launch configuration to allow
> continuation after errors).
> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.AtlLauncher launch
> SEVERE: ERROR: could not find operation allInstancesFrom on MOFLeft!EClass
> having supertypes: [MOFLeft!EClassifier, OclType, OclAny] (including Java
> operations)
> java.lang.RuntimeException: ERROR: could not find operation
> allInstancesFrom on MOFLeft!EClass having supertypes:
> [MOFLeft!EClassifier, OclType, OclAny] (including Java operations)
> at
>
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:195)
> at
>
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
> at
>
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:91)
> at
>
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invok e(ASMEMFModelElement.java:700)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
>
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
> at
>
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
>
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
> at
>
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
>
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
> at UnionCOP.process(UnionCOP.java:104)
> at MMComposition.process(MMComposition.java:28)
> at Main.main(Main.java:47)
>
>
>
> Any idea on how to solve this? Thank you in advance for any help.

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: [ATL] [BUG?] programmatic launch produces ATL transformation errors [message #86144 is a reply to message #86129] Tue, 08 July 2008 19:50 Go to previous message
Eclipse UserFriend
Originally posted by: monnet2.etu.unige.ch

Oh yes, sorry, you are right.

I saw the "could not find operation" and "having supertypes:" in the error
message and as you were working with UML models I thaugth it was similar.
But it is not.

Anyway, if someone has any experience or idea on what I am doing wrong, it
would be very apreciated as I am not getting how I can solve this issue.

Best regards,
Xavier.

Aram Hovsepyan wrote:

> Hey Xavier,

> I am not sure you have the same problem. I get errors only with the
ATL
> operations that I define myself, never with the internal operations such as
> allInstancesFrom.

> regards,
> Aram.

> Xavier Monnet wrote:

>> Hello,
>>
>> I guess I am faced to a similar problem, but working with EMF Ecore meta
>> models.
>>
>> I defined an ATL file for doing the union of two meta models based on
>> Ecore. On the Eclipse ATL plugin all works fine.
>>
>> My transformation take as inputs:
>> - the left meta model MOFLeft which conforms to EMF Ecore
>> - the right meta model MOFRight which conforms to EMF Ecore
>>
>> And it produces as output a composed meta model (which conforms to EMF
>> Ecore too) with the union of content of both meta models.
>>
>> But launching it from Java with the AtlLauncher I get the following error
>> message (with similar "could not find operation allInstancesFrom on
>> MOFLeft!EClass having supertypes: [MOFLeft!EClassifier, OclType, OclAny]"
>> type of message):
>>
>> Launcher info:
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>> SEVERE: ****** BEGIN Stack Trace
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>> SEVERE: message: ERROR: could not find operation allInstancesFrom on
>> MOFLeft!EClass having supertypes: [MOFLeft!EClassifier, OclType, OclAny]
>> (including Java operations)
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: A.main() : ??#22 null
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: local variables =
{self=union_execute_metamodel_transformation :
>> ASMModule}
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: local stack = []
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: A.__matcher__() : ??#3 null
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: local variables =
{self=union_execute_metamodel_transformation :
>> ASMModule}
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: local stack = []
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: A.__matchCLASSLeft() : ??#9 null
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: local variables =
{self=union_execute_metamodel_transformation :
>> ASMModule}
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.ExecEnv
>> printStackTrace
>> SEVERE: local stack = [MOFLeft!EClass, Sequence {}]
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>> SEVERE: ****** END Stack Trace
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>> INFO: Execution terminated due to error (see launch configuration to allow
>> continuation after errors).
>> Jul 8, 2008 2:29:25 PM org.eclipse.m2m.atl.engine.AtlLauncher launch
>> SEVERE: ERROR: could not find operation allInstancesFrom on MOFLeft!EClass
>> having supertypes: [MOFLeft!EClassifier, OclType, OclAny] (including Java
>> operations)
>> java.lang.RuntimeException: ERROR: could not find operation
>> allInstancesFrom on MOFLeft!EClass having supertypes:
>> [MOFLeft!EClassifier, OclType, OclAny] (including Java operations)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:195)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:91)
>> at
>>
>
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invok e(ASMEMFModelElement.java:700)
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>>
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
>> at UnionCOP.process(UnionCOP.java:104)
>> at MMComposition.process(MMComposition.java:28)
>> at Main.main(Main.java:47)
>>
>>
>>
>> Any idea on how to solve this? Thank you in advance for any help.
Previous Topic:[QVTO] Set contents not remembered between init and end
Next Topic:programatical launch of ATL transformation from ecore to ecore
Goto Forum:
  


Current Time: Sun Aug 11 13:21:56 GMT 2024

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

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

Back to the top