Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] AtlLauncher launch -List superimpose- argument
[ATL] AtlLauncher launch -List superimpose- argument [message #68495] Mon, 10 December 2007 11:22 Go to next message
Eclipse UserFriend
Originally posted by: valerio.summo.gmail.com

Hi all,
I'm trying to develop a Java Launcher for an ATL transformation from UML2 to
OWL, but I have some problems in the runATLTransformation, in the following
codeline:

AtlLauncher.getDefault().launch(transformation, libs, models, params);

The method launch(...) seems to have one more argument:

- launch (URL asmurl, Map libraries, Map models, Map asmParams, List
superimpose)

instead of:

- launch (URL asmurl, Map libraries, Map models, Map asmParams)

And so I have tried to put null as last argument, as I really don't know how
fill the value.

Anyway, when I run the code, I get the following Exception:


Dec 10, 2007 12:16:03 PM org.eclipse.m2m.atl.engine.AtlLauncher launch

SEVERE: null

java.lang.NullPointerException

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


..........

What could I do?

Thank you in advance,

Valerio
Re: [ATL] AtlLauncher launch -List superimpose- argument [message #68506 is a reply to message #68495] Mon, 10 December 2007 12:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: valerio.summo.gmail.com

If I put
Collections.EMPTY_LIST

instead of null, in this way:

AtlLauncher.getDefault().launch(transformation, libs, models, params,
Collections.EMPTY_LIST);

it's ok, but then, in the

extractXMLModelToFile(ASMModel model, String file)

I get an Exception:

Exception in thread "main" java.lang.NullPointerException

at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.getElementsB yType(ASMEMFModel.java:162)

at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel.getElements ByType(ASMModel.java:53)

at
org.eclipse.m2m.atl.engine.extractors.xml.XMLExtractor.extra ct(XMLExtractor.java:45)

at
org.eclipse.m2m.atl.engine.extractors.xml.XMLExtractor.extra ct(XMLExtractor.java:32)

at the following code line:

xmle.extract(model, out, parameters); // Do extraction !



Any help?

Thank you!

Valerio

"Valerio Summo" <valerio.summo@gmail.com> wrote in message
news:fjj7h5$utr$1@build.eclipse.org...

> Hi all,
> I'm trying to develop a Java Launcher for an ATL transformation from UML2
> to
> OWL, but I have some problems in the runATLTransformation, in the
> following
> codeline:
>
> AtlLauncher.getDefault().launch(transformation, libs, models, params);
>
> The method launch(...) seems to have one more argument:
>
> - launch (URL asmurl, Map libraries, Map models, Map asmParams, List
> superimpose)
>
> instead of:
>
> - launch (URL asmurl, Map libraries, Map models, Map asmParams)
>
> And so I have tried to put null as last argument, as I really don't know
> how fill the value.
>
> Anyway, when I run the code, I get the following Exception:
>
>
> Dec 10, 2007 12:16:03 PM org.eclipse.m2m.atl.engine.AtlLauncher launch
>
> SEVERE: null
>
> java.lang.NullPointerException
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:144)
>
>
> .........
>
> What could I do?
>
> Thank you in advance,
>
> Valerio
>
>
Re: [ATL] AtlLauncher launch -List superimpose- argument [message #69646 is a reply to message #68506] Thu, 13 December 2007 21:32 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

> If I put
> Collections.EMPTY_LIST
>
> instead of null, in this way:
>
> AtlLauncher.getDefault().launch(transformation, libs, models, params,
> Collections.EMPTY_LIST);
>
> it's ok,

This is what you should do indeed.


> but then, in the
>
> extractXMLModelToFile(ASMModel model, String file)
>
> I get an Exception:

Could you try to save the XML model without using the XML extractor
(i.e., in XMI), to check if it is correct (e.g., has a root).

If not, then the problem is before the extraction (e.g., in one of the
transformations)


Regards,

Frédéric Jouault
Previous Topic:[ATL] Jar files instead of plug-in dependencies?
Next Topic:[ATL] NPE in content assist
Goto Forum:
  


Current Time: Sat Apr 10 14:36:59 GMT 2021

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

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

Back to the top