Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Launch programmatically + 2.0 bundle
[ATL] Launch programmatically + 2.0 bundle [message #66548] Wed, 21 November 2007 08:57 Go to next message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
First of all, sorry if this has been asked already. I checked everywhere and
I can find information about launching ATL transformations programmatically
(from Java code, outside Eclipse) with the old bundle, but for developing
and compiling my transformation I used the 2.0rc2 bundle.

I need to know the libraries to import in the classpath. The JARs listed at
http://wiki.eclipse.org/ATL_Howtos#Libraries_and_Prequesites refer to the
old bundle and I can't even find the first (ATL-Importer.jar) in the new
bundle. Is there a newer list of libraries?

Thank you.

--
Lorenzo
Re: [ATL] Launch programmatically + 2.0 bundle [message #66573 is a reply to message #66548] Wed, 21 November 2007 16:27 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 297
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010007030406010309070103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

The wiki page http://wiki.eclipse.org/ATL_Howtos#Libraries_and_Prequesites
was out of date, so I corrected it. It is correct now :-), and you can
consult it again.
Thanks for reporting the problem !

Best regards,
William

Lorenzo Dalla Vecchia a
Re: [ATL] Launch programmatically + 2.0 bundle [message #66591 is a reply to message #66573] Wed, 21 November 2007 19:08 Go to previous messageGo to next message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
> The wiki page http://wiki.eclipse.org/ATL_Howtos#Libraries_and_Prequesites
> was out of date, so I corrected it. It is correct now :-), and you can
> consult it again.

Great!

> Thanks for reporting the problem !

Thanks to you! :)

--
Lorenzo
Re: [ATL] Launch programmatically + 2.0 bundle [message #66676 is a reply to message #66573] Thu, 22 November 2007 15:01 Go to previous messageGo to next message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
I'm still trying to run a ATL transformation programmatically.

> The wiki page http://wiki.eclipse.org/ATL_Howtos#Libraries_and_Prequesites
> was out of date, so I corrected it. It is correct now :-), and you can
> consult it again.

I found the following files to be also needed:
- org.eclipse.equinox.common_3.3.0.v20070426.jar (for CoreException)
- org.eclipse.core.jobs_3.3.0.v20070423.jar (for ISchedulingRule)

Now I'm facing another problem that I think it's more than just a missing
JAR.
As a first step in my code I'm initializing the EMF model handler with this
code, insipired by KM3Projector's initEMF method:

handler = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);

and getting the following error about not being able to *initialize* (not
just find) a class.

Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class org.eclipse.core.runtime.Platform
at
org.eclipse.m2m.atl.engine.AtlEMFModelHandler.<init>(AtlEMFModelHandler.java:162)
at
org.eclipse.m2m.atl.engine.AtlModelHandler.getDefault(AtlMod elHandler.java:55)
at AtlTransformer.initializeHandler(AtlTransformer.java:183)
at AtlTransformer.<init>(AtlTransformer.java:37)
at AtlTest.main(AtlTest.java:14)

org.eclipse.core.runtime.Platform is in
org.eclipse.core.runtime_3.3.100.v20070530, that I already included in the
project references. I still didn't try with MDR.
How to fix the problem?

Thnaks.

--
Lorenzo
Re: [ATL] Launch programmatically + 2.0 bundle [message #66696 is a reply to message #66676] Thu, 22 November 2007 16:38 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 297
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080904020508050007010103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Lorenzo Dalla Vecchia a
Re: [ATL] Launch programmatically + 2.0 bundle [message #66735 is a reply to message #66696] Sun, 25 November 2007 11:49 Go to previous messageGo to next message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
Thanks to your helpe I was able to run ATL outside Eclipse!

No more exception is thrown, however I'm facing a problem where my output
model (ecore) contains only an instance of the source model element and
nothing more. The same transformation with the same input models works when
launched through eclipse. What could be causing this? Maybe I need to
specify parameters/options in the launch method?

Thanks again.

--
Lorenzo
Re: [ATL] Launch programmatically + 2.0 bundle [message #66753 is a reply to message #66735] Mon, 26 November 2007 09:25 Go to previous messageGo to next message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
> No more exception is thrown, however I'm facing a problem where my output
> model (ecore) contains only an instance of the source model element and
> nothing more. The same transformation with the same input models works
> when launched through eclipse. What could be causing this? Maybe I need to
> specify parameters/options in the launch method?

Never mind. I was using MOF as model for the input model.

--
Lorenzo
It works, but behaves strange. [message #66781 is a reply to message #66696] Mon, 26 November 2007 10:18 Go to previous message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
Ok, I was able to make a transformation work stand-alone. However, while
there is no error message, the resulting model does contain errors :(

Everything is the same: source models, transformation, etc, but the
generated model is slightly different. It's like some of the helpers are not
working. Maybe that's because I used unstable code from CVS to compile some
of the libraries? Or maybe I need to supply AtlLauncher params/options?

Thank you.

--
Lorenzo
Previous Topic:How build DD Model with UML metamodel
Next Topic:[ATL] uml inter-model references problems
Goto Forum:
  


Current Time: Sun Apr 11 23:08:55 GMT 2021

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

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

Back to the top