Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Incorrect access to model in ubuntu
Incorrect access to model in ubuntu [message #507126] Tue, 12 January 2010 04:27 Go to next message
Raul  is currently offline Raul Friend
Messages: 14
Registered: November 2009
Junior Member
Hi, I am trying to validate a model using evl in Ubuntu 9.04 and Eclipse Galileo. When validating I get a message that says

Resource 'xxx' does not exist. (xxx is a file path)

The file exists and debugging the execution I found that in the class EmfModel the instruction this.modelFileUri = EmfUtil.createURI(modelFile); returns the URI with "platform:/resource" before the valid path.
Inside the method createURI() I see that these lines are commented:

// Handle paths that start with / under Unix e.g. /local/foo.txt
//else if (OperatingSystem.isUnix() && s.startsWith("/")) {
// return URI.createFileURI(s);
//}

Could be my problem because that?

Best regards,
Raul
Re: Incorrect access to model in ubuntu [message #507139 is a reply to message #507126] Tue, 12 January 2010 04:52 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Raul,

Are you launching the validation through the UI or through Java code?

Cheers,
Dimitris

Raul wrote:
> Hi, I am trying to validate a model using evl in Ubuntu 9.04 and Eclipse
> Galileo. When validating I get a message that says
> Resource 'xxx' does not exist. (xxx is a file path)
>
> The file exists and debugging the execution I found that in the class
> EmfModel the instruction this.modelFileUri =
> EmfUtil.createURI(modelFile); returns the URI with "platform:/resource"
> before the valid path. Inside the method createURI() I see that these
> lines are commented:
>
> // Handle paths that start with / under Unix e.g. /local/foo.txt
> //else if (OperatingSystem.isUnix() && s.startsWith("/")) {
> // return URI.createFileURI(s);
> //}
>
> Could be my problem because that?
>
> Best regards,
> Raul
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Incorrect access to model in ubuntu [message #507150 is a reply to message #507139] Tue, 12 January 2010 10:31 Go to previous messageGo to next message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Dimitrios,

I am working with Raul in the same project. The validation is launched through java code.

Best regards,
Hector
Re: Incorrect access to model in ubuntu [message #507161 is a reply to message #507150] Tue, 12 January 2010 10:35 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Hector,

To be on the safe side when loading EMF models from Java, you should use
the complete URI (e.g. file:/foo/bar.model,
platform:/resource/foo/bar.model)

Cheers,
Dimitris

H wrote:
> Hi Dimitrios,
>
> I am working with Raul in the same project. The validation is launched
> through java code.
>
> Best regards,
> Hector


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Incorrect access to model in ubuntu [message #507186 is a reply to message #507161] Tue, 12 January 2010 12:25 Go to previous messageGo to next message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
What do you mean with "safe side"?

Let's specify a little more the problem.

I call the evl validation through java using a plugin, and in order to do that I launch a second Eclipse instance where the models are. In Windows I have never had this issues (still haven't) but when running the tests from Linux I get this error. In Windows createURI does not add the prefix "platform:/resource", does it mean it has no need of keeping in the safe side?

/foo/bar.model is an absolute path, doesn't it? Or should I give workspace relative paths in Linux?

Many thanks,
Hector
Re: Incorrect access to model in ubuntu [message #507229 is a reply to message #507186] Tue, 12 January 2010 15:00 Go to previous messageGo to next message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
I reply to myself:

I have made it work changing the given path from an absolute path to a workspace relative path. Now, using the epsilon OperativeSystem utilities I change the path of the model depending on the S.O. of the computer.

Is this the correct way or would it be fixed?

Best regards,
Hector
Re: Incorrect access to model in ubuntu [message #507238 is a reply to message #507229] Tue, 12 January 2010 15:12 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
That sounds right.

Cheers,
Dimitris

Hector wrote:
> I reply to myself:
>
> I have made it work changing the given path from an absolute path to a
> workspace relative path. Now, using the epsilon OperativeSystem
> utilities I change the path of the model depending on the S.O. of the
> computer.
>
> Is this the correct way or would it be fixed?
>
> Best regards,
> Hector


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Incorrect access to model in ubuntu [message #584681 is a reply to message #507161] Tue, 12 January 2010 12:25 Go to previous message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
What do you mean with "safe side"?

Let's specify a little more the problem.

I call the evl validation through java using a plugin, and in order to do that I launch a second Eclipse instance where the models are. In Windows I have never had this issues (still haven't) but when running the tests from Linux I get this error. In Windows createURI does not add the prefix "platform:/resource", does it mean it has no need of keeping in the safe side?

/foo/bar.model is an absolute path, doesn't it? Or should I give workspace relative paths in Linux?

Many thanks,
Hector
Re: Incorrect access to model in ubuntu [message #584695 is a reply to message #507186] Tue, 12 January 2010 15:00 Go to previous message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
I reply to myself:

I have made it work changing the given path from an absolute path to a workspace relative path. Now, using the epsilon OperativeSystem utilities I change the path of the model depending on the S.O. of the computer.

Is this the correct way or would it be fixed?

Best regards,
Hector
Re: Incorrect access to model in ubuntu [message #584711 is a reply to message #584695] Tue, 12 January 2010 15:12 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
That sounds right.

Cheers,
Dimitris

Hector wrote:
> I reply to myself:
>
> I have made it work changing the given path from an absolute path to a
> workspace relative path. Now, using the epsilon OperativeSystem
> utilities I change the path of the model depending on the S.O. of the
> computer.
>
> Is this the correct way or would it be fixed?
>
> Best regards,
> Hector


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:Incorrect access to model in ubuntu
Next Topic:problems with ETL
Goto Forum:
  


Current Time: Tue Apr 16 16:01:59 GMT 2024

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

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

Back to the top