Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] atlcommandline
[ATL] atlcommandline [message #60051] Fri, 31 August 2007 08:14 Go 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.
--------------000901000307030400020600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

I attempt to run the Families2Persons Example outside Eclipse. I'm using
the ATL Command-Line tool done by Dennis Wagelaar.

When launching the program outside of Eclipse, transformation works and
the output model is generated, but an error is displayed :

java.lang.IllegalStateException: Workspace is
closed.java.lang.IllegalStateException: Workspace is closed.
at
org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:326)Usage:
<this program> --trans <transformation url> [--in <id>=<model>
<id>=<metamodel> <MDR|EMF>] [--out <id>=<model> <id>=<metamodel>
<MDR|EMF>] [--lib <id>=<library url>] [--superimpose <transformation
url>] --next --trans ...

at
org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:144)
at
org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:61)
at org.atl.commandline.Main.run(Main.java:325)
at org.atl.commandline.Main.main(Main.java:92)

Did someone ever has this problem ?
Thanks in advance,

William

--------------000901000307030400020600
Content-Type: text/x-vcard; charset=utf-8;
name="william.piers.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="william.piers.vcf"

begin:vcard
fn:William Piers
n:Piers;William
org:Obeo
adr:2 rue Robert Schumann;;lot 24;NANTES;;44408;France
email;internet:william.piers@obeo.fr
title:MDA Consultant
tel;work:+33 (0)2 51 13 51 82
tel;cell:+33 (0)6 20 31 75 98
url:http://www.obeo.fr
version:2.1
end:vcard


--------------000901000307030400020600--
Re: [ATL] atlcommandline [message #60074 is a reply to message #60051] Fri, 31 August 2007 14:13 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
I have different line numbers than you specify in your stacktrace. Can
you verify that you have the latest Main.java (from SVN) as well as the
latest ATL? Please also send the parameters you give to Main.java.

Dennis

William Piers schreef:
> Hello,
>
> I attempt to run the Families2Persons Example outside Eclipse. I'm using
> the ATL Command-Line tool done by Dennis Wagelaar.
>
> When launching the program outside of Eclipse, transformation works and
> the output model is generated, but an error is displayed :
>
> java.lang.IllegalStateException: Workspace is
> closed.java.lang.IllegalStateException: Workspace is closed.
> at
> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:326)Usage:
> <this program> --trans <transformation url> [--in <id>=<model>
> <id>=<metamodel> <MDR|EMF>] [--out <id>=<model> <id>=<metamodel>
> <MDR|EMF>] [--lib <id>=<library url>] [--superimpose <transformation
> url>] --next --trans ...
>
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:144)
>
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:61)
>
> at org.atl.commandline.Main.run(Main.java:325)
> at org.atl.commandline.Main.main(Main.java:92)
>
> Did someone ever has this problem ?
> Thanks in advance,
>
> William
Re: [ATL] atlcommandline [message #60097 is a reply to message #60074] Fri, 31 August 2007 14:50 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.
--------------080405020709030705080402
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Thanks for the answer.

Dennis Wagelaar a
Re: [ATL] atlcommandline [message #60263 is a reply to message #60097] Mon, 03 September 2007 11:16 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Ah, I think I found the problem:

IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(
new Path(uri.path()));
file.setDerived(true);

EMF can work outside the workspace with URIs, but now ATL tries to set
all generated files as derived. ATL should only do that when the Eclipse
workspace is available.

Please copy & paste this entire conversation into bugzilla ;-).

Regards,
Dennis

P.S. If I'm correct about this problem, your model should still be
saved. Please check if this is true.

William Piers schreef:
> Hello,
>
> Thanks for the answer.
>
> Dennis Wagelaar a écrit :
>> I have different line numbers than you specify in your stacktrace. Can
>> you verify that you have the latest Main.java (from SVN)
>
> I think I use the latest version, but when I copy the stack trace I may
> have added some System.out.println somewhere in order to debug...
> The exact trace is :
>
> java.lang.IllegalStateException: Workspace is
> closed.java.lang.IllegalStateException: Workspace is closed.
> at
> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:326)
>
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:144)
>
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:61)
>
> at org.atl.commandline.Main.run(Main.java:324)
> at org.atl.commandline.Main.main(Main.java:91)
>
>
> Are line numbers correct ?
> And the Main I use is this one :
> http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML1CaseStudies/uml 1cs-atlcommandline/src/org/atl/commandline/Main.java?view=ma rkup
>
>
>> as well as the latest ATL?
>
> In order to use the latest ATL and Eclipse version I had to update some
> libraries which where not available at the location indicated in the
> copydep.xml file. So I need to build vm.jar and emf4atl.jar myself using
> ATL latest source code.
> So I think libraries are OK.
>
>> Please also send the parameters you give to Main.java.
>
> Here is the command I use for launching :
> --trans file:/D:/test/Families2Persons.asm --in
> IN=file:/D:/test/sample-Families.ecore
> Families=file:/D:/test/Families.ecore EMF --out
> OUT=file:/D:/test/sample-Persons.ecore
> Persons=file:/D:/test/Persons.ecore EMF
>
>
> NOTE :
> I did a little modification to the original Main.java file, at line 112
> : I replaced
> URI absURI = URI.createURI(uri).resolve(cwd);
> by
> URI absURI = URI.createURI(uri);//.resolve(cwd);
>
> Because when launching, I had this error :
> java.lang.IllegalArgumentException: resolve against non-hierarchical or
> relative base
> at org.eclipse.emf.common.util.URI.resolve(URI.java:1940)
> at org.eclipse.emf.common.util.URI.resolve(URI.java:1913)
> at org.atl.commandline.Main.loadModel(Main.java:112)
> at org.atl.commandline.Main.addInputModel(Main.java:219)
> at org.atl.commandline.Main.parseArgs(Main.java:160)
> at org.atl.commandline.Main.main(Main.java:89)
>
> But this modification has no effect on the "saveModel" part, which seems
> to be problematic in my bug.
>
> Thanks in advance,
> William
>
>> Dennis
>>
>> William Piers schreef:
>>> Hello,
>>>
>>> I attempt to run the Families2Persons Example outside Eclipse. I'm
>>> using the ATL Command-Line tool done by Dennis Wagelaar.
>>>
>>> When launching the program outside of Eclipse, transformation works
>>> and the output model is generated, but an error is displayed :
>>>
>>> java.lang.IllegalStateException: Workspace is
>>> closed.java.lang.IllegalStateException: Workspace is closed.
>>> at
>>> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:326)Usage:
>>> <this program> --trans <transformation url> [--in <id>=<model>
>>> <id>=<metamodel> <MDR|EMF>] [--out <id>=<model> <id>=<metamodel>
>>> <MDR|EMF>] [--lib <id>=<library url>] [--superimpose <transformation
>>> url>] --next --trans ...
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:144)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.saveModel(AtlE MFModelHandler.java:61)
>>>
>>> at org.atl.commandline.Main.run(Main.java:325)
>>> at org.atl.commandline.Main.main(Main.java:92)
>>>
>>> Did someone ever has this problem ?
>>> Thanks in advance,
>>>
>>> William
Re: [ATL] atlcommandline [message #60358 is a reply to message #60263] Mon, 03 September 2007 12:31 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.
--------------070006000904040305090703
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

OK thanks.
Indeed the file is saved. I reported the bug.

Best regards,

William Piers

Dennis Wagelaar a
Re: [ATL] atlcommandline [message #60406 is a reply to message #60358] Tue, 04 September 2007 12:43 Go to previous message
Eclipse UserFriend
Originally posted by: Hugo.Bruneliere.univ-nantes.fr

Hi William,

I already had this kind of problem in the past and I implemented a new
"save" method which allows specifying if the model you want to save is
inside or outside the workspace. This method has been integrated into
the AtlEMFModelHandler class.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=197797

Best regards,

Hugo

P.S. I also post this text as a new comment in Bugzilla
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=202069)

--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
Previous Topic:[ATL] Splitting ASMModel
Next Topic:[QVT] Are oml output models write-only by spec?
Goto Forum:
  


Current Time: Sun Apr 11 02:23:16 GMT 2021

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

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

Back to the top