[ATL] ATL Transformation launch manually sucess. programmatically no sucess [message #637961] |
Tue, 09 November 2010 13:42 |
J.Teutsch 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
from ENamedElement.

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 |
J.Teutsch 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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03176 seconds