Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] One more problem in running Main.java written by Dennis
[ATL] One more problem in running Main.java written by Dennis [message #45837] Wed, 13 June 2007 07:46 Go to next message
stephen Yu is currently offline stephen YuFriend
Messages: 35
Registered: July 2009
Member
Hi
I downloaded the Main.java which written by
Dennis( http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML1CaseStudies/uml 1cs-atlcommandline/src/org/atl/commandline/Main.java?view=ma rkup)
to learn how to run ATL in stand-alone mode. However, I failed to run
Main.java.

I always get "java.lang.IllegalArgumentException: resolve against
non-hierarchical or relative basejava.lang.IllegalArgumentException:
resolve against non-hierarchical or relative base"

After looking into the code, I found:
private static URI cwd =
URI.createURI("file:" + new File(".").getAbsolutePath()); This
static statement will create a URI whose attribute 'abosolutePath' is
false and 'hierarchical' is false too.
However, in following method:
public static ASMModel loadModel(AtlModelHandler amh, String modelId,
ASMModel metaModel, String uri) ......
URI absURI = URI.createURI(uri).resolve(cwd); .......
//the resolve method call will throw "java.lang.IllegalArgumentException:
resolve against non-hierarchical or relative
basejava.lang.IllegalArgumentException: resolve against non-hierarchical
or relative base" ,because the cwd passed in is neither abosolutePath nor
hierarchical.

That's why I always get IllegalArgumentException. I can not figure it out,
do you have any idea about it?
Thanks a lot.

Stephen Yu
Re: [ATL] One more problem in running Main.java written by Dennis [message #45867 is a reply to message #45837] Wed, 13 June 2007 08:00 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Stephen Yu schreef:
> Hi

Hi Stephen,

> I downloaded the Main.java which written by
> Dennis( http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML1CaseStudies/uml 1cs-atlcommandline/src/org/atl/commandline/Main.java?view=ma rkup)
> to learn how to run ATL in stand-alone mode. However, I failed to run
> Main.java.
>
> I always get "java.lang.IllegalArgumentException: resolve against
> non-hierarchical or relative basejava.lang.IllegalArgumentException:
> resolve against non-hierarchical or relative base"
>
> After looking into the code, I found:
> private static URI cwd = URI.createURI("file:" + new
> File(".").getAbsolutePath()); This static statement will create a URI
> whose attribute 'abosolutePath' is false and 'hierarchical' is false too.
> However, in following method:
> public static ASMModel loadModel(AtlModelHandler amh, String modelId,
> ASMModel metaModel, String uri) ......
> URI absURI = URI.createURI(uri).resolve(cwd); .......
> //the resolve method call will throw
> "java.lang.IllegalArgumentException: resolve against non-hierarchical or
> relative basejava.lang.IllegalArgumentException: resolve against
> non-hierarchical or relative base" ,because the cwd passed in is neither
> abosolutePath nor hierarchical.
>
> That's why I always get IllegalArgumentException. I can not figure it
> out, do you have any idea about it?
> Thanks a lot.
>
> Stephen Yu
>

Sorry, but I cannot reproduce your problem. Can you provide some files
with which I can trigger this exception? I will also need the exact
command/method you used to invoke ATL.

I do use the command line interface with relative paths. An example of
how I use the command line interface can be found here:
http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML1CaseStudies/uml 1cs-instantmessenger-model/outmodels/test2mm/build.xml?rev=5 387&view=markup

Regards,
Dennis
Previous Topic:Simultanious loading of two collections which are brances of the same tree
Next Topic:[ATL] run Atl transfomation by program with eclipse 3.3
Goto Forum:
  


Current Time: Fri Apr 19 16:46:52 GMT 2024

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

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

Back to the top