[ATL] atlcommandline [message #60051] |
Fri, 31 August 2007 04:14  |
Eclipse User |
|
|
|
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 #60263 is a reply to message #60097] |
Mon, 03 September 2007 07:16   |
Eclipse User |
|
|
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07361 seconds