Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Problem with UML-Reference
[ATL] Problem with UML-Reference [message #66818] Mon, 26 November 2007 19:33 Go to next message
Eclipse UserFriend
Originally posted by: marfei.cs.tu-berlin.de

Hi all,

I've written a simple tool which transforms models programmatically using
ATL. When I run the tool with the Family2Persons example files, all works
fine und I get the desired result.
But when I try to transform my special model (EMF), I get some warnings
while loading the output model and when the transformation runs an exception
is thrown.
The output model is a simple ecore-model that represents UFA (UML for
aspects). It references the uml model in some parts e.g.:

OTuml.ecore:
==================
[...]

<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="otuml"
nsURI="http://objectteams.org/otuml" nsPrefix="otuml">
<eClassifiers xsi:type="ecore:EClass" name="Role"
eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s ">
<eStructuralFeatures xsi:type="ecore:EReference" name="baseClassifier"
eType="ecore:EClass
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas sifier "/>
<eStructuralFeatures xsi:type="ecore:EReference" name="callinMethod"
upperBound="-1"
eType="#//CallinMethod" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="methodBinding"
upperBound="-1"
eType="#//MethodBinding" containment="true"/>
</eClassifiers>

[...]
==================

When I try to load that model, I get a lot of warnings, e.g:

==================
[...]

26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor
WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
(eProxyURI:
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is null;
cannot be referenced
26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor
WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
(eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
is null; cannot be referenced
26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor
WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
(eProxyURI:
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is null;
cannot be referenced

[...]
==================

The transformation stops with the exception, that some parts of the model
could not be found, e.g:

==================
[...]

26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
SCHWERWIEGEND: ****** BEGIN Stack Trace
26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
SCHWERWIEGEND: message: no type named 'Model' in metamodel 'OT'
26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
SCHWERWIEGEND: A.main() : ??#22 null
26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}

[...]
==================

I suppose, that error occures because of the missing uml reference. I
already referenced the "org.eclipse.uml2.uml_2.1.1.v200707311200"-JAR-file
in my project but it still doesn't work.

Have anyone an idea how to fix this problem?

Thanks in advance,

Marko
Re: [ATL] Problem with UML-Reference [message #66823 is a reply to message #66818] Mon, 26 November 2007 20:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marfei.cs.tu-berlin.de

There's a failure in my last post, instead of output model, I mean output
_meta_ model.

"Marko Feistkorn" <marfei@cs.tu-berlin.de> wrote in message
news:fif733$r1a$1@build.eclipse.org...
> Hi all,
>
> I've written a simple tool which transforms models programmatically using
> ATL. When I run the tool with the Family2Persons example files, all works
> fine und I get the desired result.
> But when I try to transform my special model (EMF), I get some warnings
> while loading the output model and when the transformation runs an
> exception is thrown.
> The output model is a simple ecore-model that represents UFA (UML for
> aspects). It references the uml model in some parts e.g.:
>
> OTuml.ecore:
> ==================
> [...]
>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="otuml"
> nsURI="http://objectteams.org/otuml" nsPrefix="otuml">
> <eClassifiers xsi:type="ecore:EClass" name="Role"
> eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s ">
> <eStructuralFeatures xsi:type="ecore:EReference" name="baseClassifier"
> eType="ecore:EClass
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas sifier "/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="callinMethod"
> upperBound="-1"
> eType="#//CallinMethod" containment="true"/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="methodBinding"
> upperBound="-1"
> eType="#//MethodBinding" containment="true"/>
> </eClassifiers>
>
> [...]
> ==================
>
> When I try to load that model, I get a lot of warnings, e.g:
>
> ==================
> [...]
>
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
> (eProxyURI:
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
> null; cannot be referenced
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
> is null; cannot be referenced
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
> (eProxyURI:
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
> null; cannot be referenced
>
> [...]
> ==================
>
> The transformation stops with the exception, that some parts of the model
> could not be found, e.g:
>
> ==================
> [...]
>
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
> SCHWERWIEGEND: ****** BEGIN Stack Trace
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
> SCHWERWIEGEND: message: no type named 'Model' in metamodel 'OT'
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
> SCHWERWIEGEND: A.main() : ??#22 null
> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}
>
> [...]
> ==================
>
> I suppose, that error occures because of the missing uml reference. I
> already referenced the "org.eclipse.uml2.uml_2.1.1.v200707311200"-JAR-file
> in my project but it still doesn't work.
>
> Have anyone an idea how to fix this problem?
>
> Thanks in advance,
>
> Marko
>
>
Re: [ATL] Problem with UML-Reference [message #66840 is a reply to message #66823] Wed, 28 November 2007 15:58 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.
--------------060002070803090503020800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Marco,

Do your transformation works when you launch it in the regular way (ANT
or launch config) ?

Quentin GLINEUR

Marko Feistkorn a
Re: [ATL] Problem with UML-Reference [message #66843 is a reply to message #66840] Wed, 28 November 2007 16:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marfei.cs.tu-berlin.de

Hi Quentin,

when I launch my transformation via the Eclipse "Run as"-Dialog everything
works fine. I think the problem is, that the referenced UML parts are not
found while loading my output meta model ( see attachment).

I used the following code to load my output meta model:

=====================================
AtlEMFModelHandler objEMFHandler =
(AtlEMFModelHandler)AtlEMFModelHandler.getDefault(AtlModelHa ndler.AMH_EMF);

ASMModel objOutputMetaModel =
objEMFHandler.loadModel(strOutputMetaModelName, objEMFHandler.getMof(),
urlOutputMetaModel.openStream());

======================================

When I load the output meta model
(objEMFHandler.loadModel(strOutputMetaModelName....), I got the descriped
Warnings:

======================================
28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
(eProxyURI:
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is null;
cannot be referenced

28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
(eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
is null; cannot be referenced

28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
(eProxyURI:
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is null;
cannot be referenced

28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
(eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
is null; cannot be referenced

28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@1f03691
(eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
is null; cannot be referenced

28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
(eProxyURI:
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is null;
cannot be referenced

28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
addReferencedExtentsFor

WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
(eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
is null; cannot be referenced

[...]

======================================

Because of the missing references, I suppose the following exception is
thrown:

======================================

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error

SCHWERWIEGEND: ****** BEGIN Stack Trace

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error

SCHWERWIEGEND: message: no type named 'Model' in metamodel 'OT'

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: A.main() : ??#22 null

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: local stack = []

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: A.__matcher__() : ??#1 null

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: local stack = []

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: A.__matchUFMModel2OTModel() : ??#34 244:14-244:22

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule,
s=IN!Featuremodell}

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace

SCHWERWIEGEND: local stack = [TransientLinkSet {}, TransientLink {rule =
'UFMModel2OTModel', sourceElements = {s = IN!Featuremodell}, targetElements
= {}, variables = {}}, TransientLink {rule = 'UFMModel2OTModel',
sourceElements = {s = IN!Featuremodell}, targetElements = {}, variables =
{}}, 't']

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error

SCHWERWIEGEND: ****** END Stack Trace

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error

INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).

28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.AtlLauncher launch

SCHWERWIEGEND: no type named 'Model' in metamodel 'OT'

java.lang.RuntimeException: no type named 'Model' in metamodel 'OT'

at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)

at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)

at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:81)

at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel.newModelEle ment(ASMModel.java:73)

at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:209)

at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)

at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)

at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)

at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)

at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)

at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)

at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)

at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)

at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)

at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)

at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)

at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)

at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)

at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)

at de.diploma.atl.transform.ATLTransform.transform(ATLTransform .java:237)

at de.diploma.atl.transform.ATLTransform.transform(ATLTransform .java:267)

at de.diploma.atl.transform.test.Main.main(Main.java:65)

======================================

Thanks in advance,

Marko

"Quentin Glineur" <quentin.glineur@obeo.fr> wrote in message
news:fik383$t8o$1@build.eclipse.org...
> Hi Marco,
>
> Do your transformation works when you launch it in the regular way (ANT
> or launch config) ?
>
> Quentin GLINEUR
>
> Marko Feistkorn a
  • Attachment: OTuml.ecore
    (Size: 3.55KB, Downloaded 218 times)
Re: [ATL] Problem with UML-Reference [message #67668 is a reply to message #66843] Thu, 29 November 2007 16:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marfei.cs.tu-berlin.de

Hi all,

I found a solution for my problem. A fellow student told my, that I have to
put the uml.ecore into the same folder like the referencing model. I tried
and to my surprise it works. As it is only a workaround I would really
appreciate, if somebody had a straight forward solution.

Cheers,

Marko

"Marko Feistkorn" <marfei@cs.tu-berlin.de> wrote in message
news:fik5m1$ned$1@build.eclipse.org...
> Hi Quentin,
>
> when I launch my transformation via the Eclipse "Run as"-Dialog
> everything works fine. I think the problem is, that the referenced UML
> parts are not found while loading my output meta model ( see attachment).
>
> I used the following code to load my output meta model:
>
> =====================================
> AtlEMFModelHandler objEMFHandler =
> (AtlEMFModelHandler)AtlEMFModelHandler.getDefault(AtlModelHa ndler.AMH_EMF);
>
> ASMModel objOutputMetaModel =
> objEMFHandler.loadModel(strOutputMetaModelName, objEMFHandler.getMof(),
> urlOutputMetaModel.openStream());
>
> ======================================
>
> When I load the output meta model
> (objEMFHandler.loadModel(strOutputMetaModelName....), I got the descriped
> Warnings:
>
> ======================================
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
> (eProxyURI:
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
> null; cannot be referenced
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
> is null; cannot be referenced
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
> (eProxyURI:
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
> null; cannot be referenced
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
> is null; cannot be referenced
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@1f03691
> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
> is null; cannot be referenced
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
> (eProxyURI:
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
> null; cannot be referenced
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
> addReferencedExtentsFor
>
> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
> is null; cannot be referenced
>
> [...]
>
> ======================================
>
> Because of the missing references, I suppose the following exception is
> thrown:
>
> ======================================
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>
> SCHWERWIEGEND: ****** BEGIN Stack Trace
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>
> SCHWERWIEGEND: message: no type named 'Model' in metamodel 'OT'
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: A.main() : ??#22 null
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: local stack = []
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: A.__matcher__() : ??#1 null
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: local stack = []
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: A.__matchUFMModel2OTModel() : ??#34 244:14-244:22
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule,
> s=IN!Featuremodell}
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>
> SCHWERWIEGEND: local stack = [TransientLinkSet {}, TransientLink {rule =
> 'UFMModel2OTModel', sourceElements = {s = IN!Featuremodell},
> targetElements = {}, variables = {}}, TransientLink {rule =
> 'UFMModel2OTModel', sourceElements = {s = IN!Featuremodell},
> targetElements = {}, variables = {}}, 't']
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>
> SCHWERWIEGEND: ****** END Stack Trace
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>
> INFO: Execution terminated due to error (see launch configuration to allow
> continuation after errors).
>
> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.AtlLauncher launch
>
> SCHWERWIEGEND: no type named 'Model' in metamodel 'OT'
>
> java.lang.RuntimeException: no type named 'Model' in metamodel 'OT'
>
> at
> org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:81)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel.newModelEle ment(ASMModel.java:73)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:209)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
>
> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
>
> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
>
> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
>
> at de.diploma.atl.transform.ATLTransform.transform(ATLTransform .java:237)
>
> at de.diploma.atl.transform.ATLTransform.transform(ATLTransform .java:267)
>
> at de.diploma.atl.transform.test.Main.main(Main.java:65)
>
> ======================================
>
> Thanks in advance,
>
> Marko
>
> "Quentin Glineur" <quentin.glineur@obeo.fr> wrote in message
> news:fik383$t8o$1@build.eclipse.org...
>> Hi Marco,
>>
>> Do your transformation works when you launch it in the regular way (ANT
>> or launch config) ?
>>
>> Quentin GLINEUR
>>
>> Marko Feistkorn a
Re: [ATL] Problem with UML-Reference [message #67752 is a reply to message #67668] Thu, 29 November 2007 23:49 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

EMF can find related XMI files using relative URIs, provided it knows
the URI of the loaded model.

However, you load your target metamodel using an InputStream, not a URI.
Therefore, if you do not additionally do a setUri on the resource, EMF
may not be able to find related files.


Regards,

Frédéric Jouault


Marko Feistkorn wrote:
> Hi all,
>
> I found a solution for my problem. A fellow student told my, that I have to
> put the uml.ecore into the same folder like the referencing model. I tried
> and to my surprise it works. As it is only a workaround I would really
> appreciate, if somebody had a straight forward solution.
>
> Cheers,
>
> Marko
>
> "Marko Feistkorn" <marfei@cs.tu-berlin.de> wrote in message
> news:fik5m1$ned$1@build.eclipse.org...
>> Hi Quentin,
>>
>> when I launch my transformation via the Eclipse "Run as"-Dialog
>> everything works fine. I think the problem is, that the referenced UML
>> parts are not found while loading my output meta model ( see attachment).
>>
>> I used the following code to load my output meta model:
>>
>> =====================================
>> AtlEMFModelHandler objEMFHandler =
>> (AtlEMFModelHandler)AtlEMFModelHandler.getDefault(AtlModelHa ndler.AMH_EMF);
>>
>> ASMModel objOutputMetaModel =
>> objEMFHandler.loadModel(strOutputMetaModelName, objEMFHandler.getMof(),
>> urlOutputMetaModel.openStream());
>>
>> ======================================
>>
>> When I load the output meta model
>> (objEMFHandler.loadModel(strOutputMetaModelName....), I got the descriped
>> Warnings:
>>
>> ======================================
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
>> (eProxyURI:
>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
>> null; cannot be referenced
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
>> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
>> is null; cannot be referenced
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
>> (eProxyURI:
>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
>> null; cannot be referenced
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
>> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
>> is null; cannot be referenced
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@1f03691
>> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
>> is null; cannot be referenced
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
>> (eProxyURI:
>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
>> null; cannot be referenced
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>> addReferencedExtentsFor
>>
>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
>> (eProxyURI: platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
>> is null; cannot be referenced
>>
>> [...]
>>
>> ======================================
>>
>> Because of the missing references, I suppose the following exception is
>> thrown:
>>
>> ======================================
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>>
>> SCHWERWIEGEND: ****** BEGIN Stack Trace
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>>
>> SCHWERWIEGEND: message: no type named 'Model' in metamodel 'OT'
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: A.main() : ??#22 null
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: local stack = []
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: A.__matcher__() : ??#1 null
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: local stack = []
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: A.__matchUFMModel2OTModel() : ??#34 244:14-244:22
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule,
>> s=IN!Featuremodell}
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.ExecEnv printStackTrace
>>
>> SCHWERWIEGEND: local stack = [TransientLinkSet {}, TransientLink {rule =
>> 'UFMModel2OTModel', sourceElements = {s = IN!Featuremodell},
>> targetElements = {}, variables = {}}, TransientLink {rule =
>> 'UFMModel2OTModel', sourceElements = {s = IN!Featuremodell},
>> targetElements = {}, variables = {}}, 't']
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>>
>> SCHWERWIEGEND: ****** END Stack Trace
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>>
>> INFO: Execution terminated due to error (see launch configuration to allow
>> continuation after errors).
>>
>> 28.11.2007 17:22:48 org.eclipse.m2m.atl.engine.AtlLauncher launch
>>
>> SCHWERWIEGEND: no type named 'Model' in metamodel 'OT'
>>
>> java.lang.RuntimeException: no type named 'Model' in metamodel 'OT'
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:81)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel.newModelEle ment(ASMModel.java:73)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:209)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
>>
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
>>
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
>>
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
>>
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
>>
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
>>
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
>>
>> at de.diploma.atl.transform.ATLTransform.transform(ATLTransform .java:237)
>>
>> at de.diploma.atl.transform.ATLTransform.transform(ATLTransform .java:267)
>>
>> at de.diploma.atl.transform.test.Main.main(Main.java:65)
>>
>> ======================================
>>
>> Thanks in advance,
>>
>> Marko
>>
>> "Quentin Glineur" <quentin.glineur@obeo.fr> wrote in message
>> news:fik383$t8o$1@build.eclipse.org...
>>> Hi Marco,
>>>
>>> Do your transformation works when you launch it in the regular way (ANT
>>> or launch config) ?
>>>
>>> Quentin GLINEUR
>>>
>>> Marko Feistkorn a écrit :
>>>> There's a failure in my last post, instead of output model, I mean
>>>> output
>>>> _meta_ model.
>>>>
>>>> "Marko Feistkorn" <marfei@cs.tu-berlin.de> wrote in message
>>>> news:fif733$r1a$1@build.eclipse.org...
>>>>> Hi all,
>>>>>
>>>>> I've written a simple tool which transforms models programmatically
>>>>> using
>>>>> ATL. When I run the tool with the Family2Persons example files, all
>>>>> works
>>>>> fine und I get the desired result.
>>>>> But when I try to transform my special model (EMF), I get some warnings
>>>>> while loading the output model and when the transformation runs an
>>>>> exception is thrown.
>>>>> The output model is a simple ecore-model that represents UFA (UML for
>>>>> aspects). It references the uml model in some parts e.g.:
>>>>>
>>>>> OTuml.ecore:
>>>>> ==================
>>>>> [...]
>>>>>
>>>>> <ecore:EPackage xmi:version="2.0"
>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="otuml"
>>>>> nsURI="http://objectteams.org/otuml" nsPrefix="otuml">
>>>>> <eClassifiers xsi:type="ecore:EClass" name="Role"
>>>>> eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s ">
>>>>> <eStructuralFeatures xsi:type="ecore:EReference"
>>>>> name="baseClassifier"
>>>>> eType="ecore:EClass
>>>>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas sifier "/>
>>>>> <eStructuralFeatures xsi:type="ecore:EReference" name="callinMethod"
>>>>> upperBound="-1"
>>>>> eType="#//CallinMethod" containment="true"/>
>>>>> <eStructuralFeatures xsi:type="ecore:EReference"
>>>>> name="methodBinding"
>>>>> upperBound="-1"
>>>>> eType="#//MethodBinding" containment="true"/>
>>>>> </eClassifiers>
>>>>>
>>>>> [...]
>>>>> ==================
>>>>>
>>>>> When I try to load that model, I get a lot of warnings, e.g:
>>>>>
>>>>> ==================
>>>>> [...]
>>>>>
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>>>>> addReferencedExtentsFor
>>>>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
>>>>> (eProxyURI:
>>>>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
>>>>> null; cannot be referenced
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>>>>> addReferencedExtentsFor
>>>>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@d4d66b
>>>>> (eProxyURI:
>>>>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s)
>>>>> is null; cannot be referenced
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel
>>>>> addReferencedExtentsFor
>>>>> WARNUNG: Resource for org.eclipse.emf.ecore.impl.EClassImpl@125d06e
>>>>> (eProxyURI:
>>>>> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Oper ation) is
>>>>> null; cannot be referenced
>>>>>
>>>>> [...]
>>>>> ==================
>>>>>
>>>>> The transformation stops with the exception, that some parts of the
>>>>> model
>>>>> could not be found, e.g:
>>>>>
>>>>> ==================
>>>>> [...]
>>>>>
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>>>>> SCHWERWIEGEND: ****** BEGIN Stack Trace
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.SimpleDebugger error
>>>>> SCHWERWIEGEND: message: no type named 'Model' in metamodel 'OT'
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.ExecEnv
>>>>> printStackTrace
>>>>> SCHWERWIEGEND: A.main() : ??#22 null
>>>>> 26.11.2007 19:08:44 org.eclipse.m2m.atl.engine.vm.ExecEnv
>>>>> printStackTrace
>>>>> SCHWERWIEGEND: local variables = {self=OTmapping : ASMModule}
>>>>>
>>>>> [...]
>>>>> ==================
>>>>>
>>>>> I suppose, that error occures because of the missing uml reference. I
>>>>> already referenced the
>>>>> "org.eclipse.uml2.uml_2.1.1.v200707311200"-JAR-file
>>>>> in my project but it still doesn't work.
>>>>>
>>>>> Have anyone an idea how to fix this problem?
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Marko
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
>
Previous Topic:Running an ant file from Java to execute some ATL transformations
Next Topic:[ATL] GetNameFromSource exception
Goto Forum:
  


Current Time: Mon Dec 30 17:25:31 GMT 2024

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

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

Back to the top