Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] troubles launching from java (even with atl-common)
icon5.gif  [ATL] troubles launching from java (even with atl-common) [message #536001] Wed, 26 May 2010 15:44
Sébastien  Gandon is currently offline Sébastien GandonFriend
Messages: 184
Registered: July 2009
Senior Member
Hello all,

It seems this question has been asked many time but I try to launch my transformation from an Eclipse plugin and it fails.
When launching the ATL from the ATL launcher everything is fine.
But I tried using generated java class from ATL plugin or even tried the atl-common plugin from google code and they both give me the same error.

org.eclipse.m2m.atl.engine.emfvm.VMException: Cannot find class orgomg::cwm::resource::record::RecordFile in reference model OUTMODEL
	at __matchFileConnection(TosMetadata400to410.atl[106:3-107:30])
		local variables: self=thisModule, s=IN!<unnamed>:INMODEL!PositionalFileConnection
	at __matcher__(TosMetadata400to410.atl)
		local variables: self=thisModule
	at main(TosMetadata400to410.atl)
		local variables: self=thisModule

actually my output metamodel named metadata.ecore is defined in one plugin (say pluginA )and depends on another metamodel called cwm.ecore that is in another plugin (say pluginB )
and the class it does not find is the cwm.ecore.

I have tried registering the package orgomg.cwm.resource.record where lies the class in the atl-common example but it fails the same way.

Does anyone have an idea on how to solve this problem ?
Does ATL uses EMF registered package via eclipse extension points ? my guess is no Wink
How to register many packages in ATL engine ?

here is my atl-common code
        //in model
        String oldMetamodelURI = "platform:/plugin/org.talend.model.migration/old_metamodels/metadata.ecore";
        String oldMetamodelNsURI = "http://www.talend.org";
        register(resource(oldMetamodelURI, true));
        //out model
        register(ConnectionPackage.eINSTANCE.eResource());
        register(RecordPackage.eINSTANCE.eResource());

        Transformation<EMFModel, EMFModel> metadata40toMetadata41 = new Transformations.Builder()
                .asm("platform:/plugin/org.talend.model.migration/samples/tos_metadata400to410.asm")
                .in(get(oldMetamodelNsURI), "IN", "INMODEL").out(get(ConnectionPackage.eNS_URI), "OUT", "OUTMODEL")
                .buildOneInOneOut();
        EMFModel out = transform(
                inject(resource("platform:/plugin/org.talend.model.migration/samples/oldPositionalFileConnection.xmi", true),
                        get(oldMetamodelNsURI)), metadata40toMetadata41);

        Resource resource = out.getResource();
        resource.save(new FileOutputStream("e:\temp\testATL.xmi"), Collections.emptyMap());
Previous Topic:[ATL] for
Next Topic:ATL Autocompletion..!!1
Goto Forum:
  


Current Time: Sun Apr 18 06:11:31 GMT 2021

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

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

Back to the top