Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] ATL Transformation launch manually sucess. programmatically no sucess(Difference between launching ATL manual or programmatically)
[ATL] ATL Transformation launch manually sucess. programmatically no sucess [message #637961] Tue, 09 November 2010 13:42 Go to next message
J.Teutsch  is currently offline J.Teutsch Friend
Messages: 7
Registered: November 2010
Junior Member
Hello ATL Team,

I have a problem launching a atl transformation programmatically.

If I launch the atl transformation manually with eclipse run as .. "Atl Transformation" the transformation runs with no error.

Using the programmatically ATLExecutor (see http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg04290.html )
I get the following error in the eclipse plugin , while accessing a field in another ecore model

org.eclipse.m2m.atl.engine.emfvm.VMException: Feature label does not exist on TableInDatabase
at __applyEventType2FromTable#14(graphicaleventquery2sql.atl[88 :6-88:22])
local variables: self=graphicaleventquery2sql : ASMModule, link=TransientLink {rule = EventType2FromTable, sourceElements = {es = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1ec0be (eClass: org.eclipse.emf.ecore.impl.EClassImpl@b53a8f (name: EventType) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {ft = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1002203 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@106307f (name: TableInDatabase) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}, es=IN!hubScheduleStream.xsd, ft=OUT!<unnamed>
at __exec__#18(graphicaleventquery2sql.atl)
local variables: self=graphicaleventquery2sql : ASMModule, e=TransientLink {rule = EventType2FromTable, sourceElements = {es = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1ec0be (eClass: org.eclipse.emf.ecore.impl.EClassImpl@b53a8f (name: EventType) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {ft = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1002203 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@106307f (name: TableInDatabase) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}
at main#107(graphicaleventquery2sql.atl)
local variables: self=graphicaleventquery2sql : ASMModule


Question 1: which launcher is used in eclipse run as ... ATLTransformation?
I think in run as ... another launcher is used.

My second thoughts are, that the program should emf register the referenced ecore model.
So I passed a second out model with a dummy.output.referencing to the ../../tool.sql/model/sqlmodel.ecore.

But still the same error happen.

Question 2: What is wrong in my assumption, how the ATL launcher should run?
Is the EMF Registration the problem?

Following the snapshots from the out metamodel

eClassifiers xsi:type="ecore:EClass" name="TableInDatabase" eSuperTypes="#//TableExpression">
<eStructuralFeatures xsi:type="ecore:EReference" name="databaseTable" lowerBound="1"
eType="ecore:EClass ../../tool.sql/model/sqlmodel.ecore#//tables/Table"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="derivedColumnList" upperBound="-1"
eType="#//ValueExpressionColumn" eOpposite="#//ValueExpressionColumn/tableInDatabase">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Gets the list of columns used anywhere in the statement that are derived from this table."/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>


snapshot from the referenced metamodel


<eClassifiers xsi:type="ecore:EClass" name="SQLObject" abstract="true" eSuperTypes=" platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//E NamedElement ">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The base object to be used for any Relation Database concept, representing the placeholder for the name and alias. This object will extend ENamedElement in the generated code. The string attribute name will be inherited&#xD;&#xA;from ENamedElement.&#xD;&#xA;&#xD;&#xA;Note: In the RDB sense, only table and view objects can be represented by aliases, but DB2 defines also database and network aliases, and even for nicknames that refer to data tables or views located on federated systems."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="dependencies" upperBound="-1"
eType="#//schema/Dependency" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="comments" upperBound="-1"
eType="#//schema/Comment" eOpposite="#//schema/Comment/SQLObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="extensions" upperBound="-1"
eType="#//schema/ObjectExtension" containment="true" eOpposite="#//schema/ObjectExtension/SQLObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="privileges" upperBound="-1"
eType="#//accesscontrol/Privilege" eOpposite="#//accesscontrol/Privilege/object"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Sequence" eSuperTypes="#//schema/TypedElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Reference: 5WD-02-Foundation-2002-12 4.21 Sequence Generators"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="identity" lowerBound="1"
eType="#//schema/IdentitySpecifier" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="schema" lowerBound="1"
eType="#//schema/Schema" eOpposite="#//schema/Schema/sequences"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Database" eSuperTypes="#//schema/SQLObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Reference: 5WD-02-Foundation-2002-12 "/>
</eAnnotations>
<eOperations name="getUserDefinedTypes" eType="#//schema/List"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="vendor" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="schemas" upperBound="-1"
eType="#//schema/Schema" eOpposite="#//schema/Schema/database"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
eType="#//schema/Event" eOpposite="#//schema/Event/Database"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="catalogs" upperBound="-1"
eType="#//schema/Catalog" eOpposite="#//schema/Catalog/Database"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="authorizationIds" upperBound="-1"
eType="#//accesscontrol/AuthorizationIdentifier" eOpposite="#//accesscontrol/AuthorizationIdentifier/Database "/>
</eClassifiers>
[ATL] ATL Transformation launch manually sucess. Update [message #638450 is a reply to message #637961] Thu, 11 November 2010 11:04 Go to previous messageGo to next message
J.Teutsch  is currently offline J.Teutsch Friend
Messages: 7
Registered: November 2010
Junior Member
Reading other posting, i have the impression, that the reason of the error is, that running the transformation as an eclipse plugin, the reference is not correct.

I changed the ecore model from
eType="ecore:EClass ../../tool.sql/model/sqlmodel.ecore#//tables/Table"/>


to
eType="ecore:EClass platform:/resource/tool.sql/model/sqlmodel.ecore#//tables/Table"/>


And i checked the extensions points for generated_packages in plugin.xml

I wonder, whether i could use the NsUri as reference, as used with http://www.eclipse.org/emf/2002/Ecore, but I had no success changing the EClass reference to another package using NsUri.

Actually I think during design time, the NsUri is not available in the EMF Repository.

So I'm still stuck, with the same error, that the transformation can not find the EClass in an other package.
icon3.gif  Re: [ATL] ATL Transformation launch manually sucess. Update [message #638727 is a reply to message #638450] Fri, 12 November 2010 11:25 Go to previous message
J.Teutsch  is currently offline J.Teutsch Friend
Messages: 7
Registered: November 2010
Junior Member
Before the error occured. There have been a lot of warnings.

Resource for org.eclipse.emf.ecore.impl.EClassImpl@9e3110 (eProxyURI: bundleentry://1175.fwk20698484/../com.softwareag.adiwa.tool.sql/model/sqlmodel.ecore#//statements/SQLDataStatement) is null; cannot be referenced

I ignored this warnings. Actually this warning give a hint to the solution.
Other postings concerning the topic "is null; cannot be referenced" point to EMF Registry.

I checked the EMF-Registry was filled.

The root cause was following
URL f2 = bundleSql.getEntry("model/sqlquerymodel.ecore");
ATLExecutor.MetaInfo outMeta = new ATLExecutor.MetaInfo("MMSql",
				f2.toExternalForm());

The Url correctly refers to a file. But in the EMF Registry was not able to locate this model.
Changing the code to
ATLExecutor.MetaInfo outMeta = new ATLExecutor.MetaInfo("MMSql",
				"platform:/plugin/tool.sql/model/sqlmodel.ecore");


finally solved the problem.
Previous Topic:[ATL] ATL Compiler version in ATL 3.0.0
Next Topic:UML to Ecore
Goto Forum:
  


Current Time: Thu Apr 25 08:29:13 GMT 2024

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

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

Back to the top