Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » AbstractEmfModel#store exception due to unmapped path
AbstractEmfModel#store exception due to unmapped path [message #13728] Tue, 10 March 2009 16:45 Go to next message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi,

When using AbstractEmfModel#store, I receive an IOException due to an
unmapped path.

I'm running Epsilon from source, and calling store from a runtime
workspace. Here's my code:

http://pastie.org/412896

save is the name of my project, and test.model is the resource that I
would like to be written.

I receive the following stack trace:

java.io.IOException: The path '/save/out.model' is unmapped
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
at
org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
at
org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
at save.Test.main(Test.java:16)


Is the filename passed to store wrong?

Cheers,
Louis.

----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #13751 is a reply to message #13728] Wed, 11 March 2009 09:17 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Louis,

I tried this code from a runtime workbench (a test button in a test
view) and it worked. On the other hand, when I tried it from a main
method it failed with the error you see too. The reason is that
"save/out.model" is resolved to "platform:/resource/save/out.model"
which when you are running a "main" is not mapped.

Cheers,
Dimitris

Louis Rose wrote:
> Hi,
>
> When using AbstractEmfModel#store, I receive an IOException due to an
> unmapped path.
>
> I'm running Epsilon from source, and calling store from a runtime
> workspace. Here's my code:
>
> http://pastie.org/412896
>
> save is the name of my project, and test.model is the resource that I
> would like to be written.
>
> I receive the following stack trace:
>
> java.io.IOException: The path '/save/out.model' is unmapped
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
>
> at
> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
>
> at
> org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
>
> at save.Test.main(Test.java:16)
>
>
> Is the filename passed to store wrong?
>
> Cheers,
> Louis.
>
> ----
> Louis Rose
> Research Student
> Department of Computer Science,
> University of York,
> Heslington, York, YO10 5DD, United Kingdom.
> +44 1904 434762
> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #13771 is a reply to message #13751] Wed, 11 March 2009 09:43 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
I see, that makes sense. I guess I'll see if I can find a way to map my
projects. (I'm not really running a main method; I'm running jUnit tests).

A somewhat related issue: I've also found that I can't create an
(Epsilon) EMF Model using the Epsilon perspective. I receive the
following exception.

It looks like Epsilon is using a mixture of platform and file URI. I'm
not sure which it should be using in this case. (/Users is a top-level
directory on my machine).

platform:/resource/Users/louis/Code/eclipse/workspaces/runti me-epsilon/gadin.actions.model/model/test.model
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Resource
'/Users' does not exist.
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:81)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.flush(PlatformResourceUR IHandlerImpl.java:108)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.close(PlatformResourceUR IHandlerImpl.java:90)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$WorkbenchHelper$1.close(PlatformResourceURIHandlerImp l.java:172)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:990)
at org.eclipse.epsilon.emc.emf.EmfModel.store(EmfModel.java:231 )
at
org.eclipse.epsilon.util.emf.NewEmfModelWizard.doFinish(NewE mfModelWizard.java:148)
at
org.eclipse.epsilon.util.emf.NewEmfModelWizard.access$0(NewE mfModelWizard.java:117)
at
org.eclipse.epsilon.util.emf.NewEmfModelWizard$1.run(NewEmfM odelWizard.java:91)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Caused by: org.eclipse.core.internal.resources.ResourceException:
Resource '/Users' does not exist.
at
org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
at
org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
at
org.eclipse.core.internal.resources.Project.checkAccessible( Project.java:113)
at
org.eclipse.core.internal.resources.Folder.assertCreateRequi rements(Folder.java:32)
at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:88)
at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:118)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:77)
... 15 more




Dimitris Kolovos wrote:
> Hi Louis,
>
> I tried this code from a runtime workbench (a test button in a test
> view) and it worked. On the other hand, when I tried it from a main
> method it failed with the error you see too. The reason is that
> "save/out.model" is resolved to "platform:/resource/save/out.model"
> which when you are running a "main" is not mapped.
>
> Cheers,
> Dimitris
>
> Louis Rose wrote:
>> Hi,
>>
>> When using AbstractEmfModel#store, I receive an IOException due to an
>> unmapped path.
>>
>> I'm running Epsilon from source, and calling store from a runtime
>> workspace. Here's my code:
>>
>> http://pastie.org/412896
>>
>> save is the name of my project, and test.model is the resource that I
>> would like to be written.
>>
>> I receive the following stack trace:
>>
>> java.io.IOException: The path '/save/out.model' is unmapped
>> at
>> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
>>
>> at
>> org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
>>
>> at save.Test.main(Test.java:16)
>>
>>
>> Is the filename passed to store wrong?
>>
>> Cheers,
>> Louis.
>>
>> ----
>> Louis Rose
>> Research Student
>> Department of Computer Science,
>> University of York,
>> Heslington, York, YO10 5DD, United Kingdom.
>> +44 1904 434762
>> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #13791 is a reply to message #13771] Wed, 11 March 2009 10:09 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Louis Rose wrote:
> I see, that makes sense. I guess I'll see if I can find a way to map my
> projects. (I'm not really running a main method; I'm running jUnit tests).

Adding the following before calling store works:

EcorePlugin.getPlatformResourceMap().put("save",
URI.createFileURI("/Users/louis/Code/eclipse/workspaces/runtime-epsilon/save/ "));

Cheers,
Louis.

----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #13811 is a reply to message #13791] Wed, 11 March 2009 10:15 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Louis Rose wrote:
> Louis Rose wrote:
>> I see, that makes sense. I guess I'll see if I can find a way to map
>> my projects. (I'm not really running a main method; I'm running jUnit
>> tests).
>
> Adding the following before calling store works:
>
> EcorePlugin.getPlatformResourceMap().put("save",
> URI.createFileURI("/Users/louis/Code/eclipse/workspaces/runtime-epsilon/save/ "));
>

Looks good! An alternative would be to use absolute file URIs e.g.
" file:/Users/louis/Code/eclipse/workspaces/runtime-epsilon/sa ve/out.model "

>
> Cheers,
> Louis.
>
> ----
> Louis Rose
> Research Student
> Department of Computer Science,
> University of York,
> Heslington, York, YO10 5DD, United Kingdom.
> +44 1904 434762
> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #14422 is a reply to message #13771] Wed, 18 March 2009 13:40 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Louis,

Thanks for reporting this. I've fixed it and committed the changes to
the SVN.

Cheers,
Dimitris

Louis Rose wrote:
<snip>
>
> A somewhat related issue: I've also found that I can't create an
> (Epsilon) EMF Model using the Epsilon perspective. I receive the
> following exception.
>
> It looks like Epsilon is using a mixture of platform and file URI. I'm
> not sure which it should be using in this case. (/Users is a top-level
> directory on my machine).
>

> platform:/resource/Users/louis/Code/eclipse/workspaces/runti me-epsilon/gadin.actions.model/model/test.model
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Resource
> '/Users' does not exist.
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:81)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.flush(PlatformResourceUR IHandlerImpl.java:108)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.close(PlatformResourceUR IHandlerImpl.java:90)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$WorkbenchHelper$1.close(PlatformResourceURIHandlerImp l.java:172)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:990)
>
> at org.eclipse.epsilon.emc.emf.EmfModel.store(EmfModel.java:231 )
> at
> org.eclipse.epsilon.util.emf.NewEmfModelWizard.doFinish(NewE mfModelWizard.java:148)
>
> at
> org.eclipse.epsilon.util.emf.NewEmfModelWizard.access$0(NewE mfModelWizard.java:117)
>
> at
> org.eclipse.epsilon.util.emf.NewEmfModelWizard$1.run(NewEmfM odelWizard.java:91)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
>
> Caused by: org.eclipse.core.internal.resources.ResourceException:
> Resource '/Users' does not exist.
> at
> org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
> at
> org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
>
> at
> org.eclipse.core.internal.resources.Project.checkAccessible( Project.java:113)
>
> at
> org.eclipse.core.internal.resources.Folder.assertCreateRequi rements(Folder.java:32)
>
> at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:88)
> at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:118)
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:77)
>
> ... 15 more
>
>
>
>
> Dimitris Kolovos wrote:
>> Hi Louis,
>>
>> I tried this code from a runtime workbench (a test button in a test
>> view) and it worked. On the other hand, when I tried it from a main
>> method it failed with the error you see too. The reason is that
>> "save/out.model" is resolved to "platform:/resource/save/out.model"
>> which when you are running a "main" is not mapped.
>>
>> Cheers,
>> Dimitris
>>
>> Louis Rose wrote:
>>> Hi,
>>>
>>> When using AbstractEmfModel#store, I receive an IOException due to an
>>> unmapped path.
>>>
>>> I'm running Epsilon from source, and calling store from a runtime
>>> workspace. Here's my code:
>>>
>>> http://pastie.org/412896
>>>
>>> save is the name of my project, and test.model is the resource that I
>>> would like to be written.
>>>
>>> I receive the following stack trace:
>>>
>>> java.io.IOException: The path '/save/out.model' is unmapped
>>> at
>>> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
>>>
>>> at
>>> org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
>>>
>>> at save.Test.main(Test.java:16)
>>>
>>>
>>> Is the filename passed to store wrong?
>>>
>>> Cheers,
>>> Louis.
>>>
>>> ----
>>> Louis Rose
>>> Research Student
>>> Department of Computer Science,
>>> University of York,
>>> Heslington, York, YO10 5DD, United Kingdom.
>>> +44 1904 434762
>>> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #565935 is a reply to message #13728] Wed, 11 March 2009 09:17 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Louis,

I tried this code from a runtime workbench (a test button in a test
view) and it worked. On the other hand, when I tried it from a main
method it failed with the error you see too. The reason is that
"save/out.model" is resolved to "platform:/resource/save/out.model"
which when you are running a "main" is not mapped.

Cheers,
Dimitris

Louis Rose wrote:
> Hi,
>
> When using AbstractEmfModel#store, I receive an IOException due to an
> unmapped path.
>
> I'm running Epsilon from source, and calling store from a runtime
> workspace. Here's my code:
>
> http://pastie.org/412896
>
> save is the name of my project, and test.model is the resource that I
> would like to be written.
>
> I receive the following stack trace:
>
> java.io.IOException: The path '/save/out.model' is unmapped
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
>
> at
> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
>
> at
> org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
>
> at save.Test.main(Test.java:16)
>
>
> Is the filename passed to store wrong?
>
> Cheers,
> Louis.
>
> ----
> Louis Rose
> Research Student
> Department of Computer Science,
> University of York,
> Heslington, York, YO10 5DD, United Kingdom.
> +44 1904 434762
> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #565959 is a reply to message #13751] Wed, 11 March 2009 09:43 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
I see, that makes sense. I guess I'll see if I can find a way to map my
projects. (I'm not really running a main method; I'm running jUnit tests).

A somewhat related issue: I've also found that I can't create an
(Epsilon) EMF Model using the Epsilon perspective. I receive the
following exception.

It looks like Epsilon is using a mixture of platform and file URI. I'm
not sure which it should be using in this case. (/Users is a top-level
directory on my machine).

platform:/resource/Users/louis/Code/eclipse/workspaces/runti me-epsilon/gadin.actions.model/model/test.model
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Resource
'/Users' does not exist.
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:81)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.flush(PlatformResourceUR IHandlerImpl.java:108)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.close(PlatformResourceUR IHandlerImpl.java:90)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$WorkbenchHelper$1.close(PlatformResourceURIHandlerImp l.java:172)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:990)
at org.eclipse.epsilon.emc.emf.EmfModel.store(EmfModel.java:231 )
at
org.eclipse.epsilon.util.emf.NewEmfModelWizard.doFinish(NewE mfModelWizard.java:148)
at
org.eclipse.epsilon.util.emf.NewEmfModelWizard.access$0(NewE mfModelWizard.java:117)
at
org.eclipse.epsilon.util.emf.NewEmfModelWizard$1.run(NewEmfM odelWizard.java:91)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Caused by: org.eclipse.core.internal.resources.ResourceException:
Resource '/Users' does not exist.
at
org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
at
org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
at
org.eclipse.core.internal.resources.Project.checkAccessible( Project.java:113)
at
org.eclipse.core.internal.resources.Folder.assertCreateRequi rements(Folder.java:32)
at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:88)
at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:118)
at
org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:77)
... 15 more




Dimitris Kolovos wrote:
> Hi Louis,
>
> I tried this code from a runtime workbench (a test button in a test
> view) and it worked. On the other hand, when I tried it from a main
> method it failed with the error you see too. The reason is that
> "save/out.model" is resolved to "platform:/resource/save/out.model"
> which when you are running a "main" is not mapped.
>
> Cheers,
> Dimitris
>
> Louis Rose wrote:
>> Hi,
>>
>> When using AbstractEmfModel#store, I receive an IOException due to an
>> unmapped path.
>>
>> I'm running Epsilon from source, and calling store from a runtime
>> workspace. Here's my code:
>>
>> http://pastie.org/412896
>>
>> save is the name of my project, and test.model is the resource that I
>> would like to be written.
>>
>> I receive the following stack trace:
>>
>> java.io.IOException: The path '/save/out.model' is unmapped
>> at
>> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
>>
>> at
>> org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
>>
>> at save.Test.main(Test.java:16)
>>
>>
>> Is the filename passed to store wrong?
>>
>> Cheers,
>> Louis.
>>
>> ----
>> Louis Rose
>> Research Student
>> Department of Computer Science,
>> University of York,
>> Heslington, York, YO10 5DD, United Kingdom.
>> +44 1904 434762
>> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #565982 is a reply to message #13771] Wed, 11 March 2009 10:09 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Louis Rose wrote:
> I see, that makes sense. I guess I'll see if I can find a way to map my
> projects. (I'm not really running a main method; I'm running jUnit tests).

Adding the following before calling store works:

EcorePlugin.getPlatformResourceMap().put("save",
URI.createFileURI("/Users/louis/Code/eclipse/workspaces/runtime-epsilon/save/ "));

Cheers,
Louis.

----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #566007 is a reply to message #13791] Wed, 11 March 2009 10:15 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Louis Rose wrote:
> Louis Rose wrote:
>> I see, that makes sense. I guess I'll see if I can find a way to map
>> my projects. (I'm not really running a main method; I'm running jUnit
>> tests).
>
> Adding the following before calling store works:
>
> EcorePlugin.getPlatformResourceMap().put("save",
> URI.createFileURI("/Users/louis/Code/eclipse/workspaces/runtime-epsilon/save/ "));
>

Looks good! An alternative would be to use absolute file URIs e.g.
" file:/Users/louis/Code/eclipse/workspaces/runtime-epsilon/sa ve/out.model "

>
> Cheers,
> Louis.
>
> ----
> Louis Rose
> Research Student
> Department of Computer Science,
> University of York,
> Heslington, York, YO10 5DD, United Kingdom.
> +44 1904 434762
> Twitter: @louisrose
Re: AbstractEmfModel#store exception due to unmapped path [message #566067 is a reply to message #13771] Wed, 18 March 2009 13:40 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Louis,

Thanks for reporting this. I've fixed it and committed the changes to
the SVN.

Cheers,
Dimitris

Louis Rose wrote:
<snip>
>
> A somewhat related issue: I've also found that I can't create an
> (Epsilon) EMF Model using the Epsilon perspective. I receive the
> following exception.
>
> It looks like Epsilon is using a mixture of platform and file URI. I'm
> not sure which it should be using in this case. (/Users is a top-level
> directory on my machine).
>

> platform:/resource/Users/louis/Code/eclipse/workspaces/runti me-epsilon/gadin.actions.model/model/test.model
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Resource
> '/Users' does not exist.
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:81)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:74)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.flush(PlatformResourceUR IHandlerImpl.java:108)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.close(PlatformResourceUR IHandlerImpl.java:90)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$WorkbenchHelper$1.close(PlatformResourceURIHandlerImp l.java:172)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:990)
>
> at org.eclipse.epsilon.emc.emf.EmfModel.store(EmfModel.java:231 )
> at
> org.eclipse.epsilon.util.emf.NewEmfModelWizard.doFinish(NewE mfModelWizard.java:148)
>
> at
> org.eclipse.epsilon.util.emf.NewEmfModelWizard.access$0(NewE mfModelWizard.java:117)
>
> at
> org.eclipse.epsilon.util.emf.NewEmfModelWizard$1.run(NewEmfM odelWizard.java:91)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
>
> Caused by: org.eclipse.core.internal.resources.ResourceException:
> Resource '/Users' does not exist.
> at
> org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
> at
> org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
>
> at
> org.eclipse.core.internal.resources.Project.checkAccessible( Project.java:113)
>
> at
> org.eclipse.core.internal.resources.Folder.assertCreateRequi rements(Folder.java:32)
>
> at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:88)
> at org.eclipse.core.internal.resources.Folder.create(Folder.jav a:118)
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$PlatformResourceOutputStream.createContainer(Platform ResourceURIHandlerImpl.java:77)
>
> ... 15 more
>
>
>
>
> Dimitris Kolovos wrote:
>> Hi Louis,
>>
>> I tried this code from a runtime workbench (a test button in a test
>> view) and it worked. On the other hand, when I tried it from a main
>> method it failed with the error you see too. The reason is that
>> "save/out.model" is resolved to "platform:/resource/save/out.model"
>> which when you are running a "main" is not mapped.
>>
>> Cheers,
>> Dimitris
>>
>> Louis Rose wrote:
>>> Hi,
>>>
>>> When using AbstractEmfModel#store, I receive an IOException due to an
>>> unmapped path.
>>>
>>> I'm running Epsilon from source, and calling store from a runtime
>>> workspace. Here's my code:
>>>
>>> http://pastie.org/412896
>>>
>>> save is the name of my project, and test.model is the resource that I
>>> would like to be written.
>>>
>>> I receive the following stack trace:
>>>
>>> java.io.IOException: The path '/save/out.model' is unmapped
>>> at
>>> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createOutputStream(PlatformResourceURIHandlerImpl.jav a:424)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createOutputStream(ExtensibleURIConverterImpl.java:290)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:983)
>>>
>>> at
>>> org.eclipse.epsilon.emc.emf.AbstractEmfModel.store(AbstractE mfModel.java:464)
>>>
>>> at save.Test.main(Test.java:16)
>>>
>>>
>>> Is the filename passed to store wrong?
>>>
>>> Cheers,
>>> Louis.
>>>
>>> ----
>>> Louis Rose
>>> Research Student
>>> Department of Computer Science,
>>> University of York,
>>> Heslington, York, YO10 5DD, United Kingdom.
>>> +44 1904 434762
>>> Twitter: @louisrose
Previous Topic:Re: Epsilon Tools
Next Topic:propertyGetter.invoke
Goto Forum:
  


Current Time: Fri Oct 24 18:49:08 GMT 2014

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

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