Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Persisting EMF models via XMI
Persisting EMF models via XMI [message #1385467] Fri, 06 June 2014 15:36 Go to next message
Thomas Zwickl is currently offline Thomas ZwicklFriend
Messages: 37
Registered: May 2014
Member
Hello everyone,

I yet again have another problem with EMF. We are no so far that we want to save the current model in a XMI File so we can load the current settings the next time the application starts again.
I read through this tutorial which describes the necessary steps very precisely:
http://www.vogella.com/tutorials/EclipseEMFPersistence/article.html

I did everything exactly as it was described, but as soon as I press the save button and the method resource.save() is invoked I get a java.net.MalformedURLException: unknown protocol: z

Here is the complete exception stack:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl.createOutputStream(URIHandlerImpl.java:110)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:349)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:996)

In the tutorial they say that you will get an exception when you miss to add some objects, but I'm very sure that I added all objects that don't have a "contains relationship". So after trying for more than two hours to solve this problem I thought maybe someone else had a similar problem and can help me out here.

Thanks in advance for your help.

Best regards,
Tom

[Updated on: Sat, 07 June 2014 22:41]

Report message to a moderator

Re: Persisting EMF models via XMI [message #1385470 is a reply to message #1385467] Fri, 06 June 2014 15:49 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 06/06/2014 17:36, Thomas Zwickl a écrit :
> Hello everyone,
>
> I yet again have another problem with EMF. We are no so far that we want
> to save the current model in a XMI File so we can load the current
> settings the next time the application starts again.
> I read through this tutorial which describes the necessary steps very
> precisely:
> www.vogella.com/tutorials/EclipseEMFPersistence/article.html
>
> I did everything exactly as it was described, but as soon as I press the
> save button and the method resource.save() is invoked I get a
> java.net.MalformedURLException: unknown protocol: z

From that message I would guess you set the resource's URI to something
like "z:\local\path"? If that is the case, you need to create a proper
URI (starting with "file:/") using something like
URI.createFileURI(""z:\\local\\path").


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Persisting EMF models via XMI [message #1385805 is a reply to message #1385470] Wed, 11 June 2014 10:37 Go to previous message
Thomas Zwickl is currently offline Thomas ZwicklFriend
Messages: 37
Registered: May 2014
Member
Thank you this works perfekt Smile
Previous Topic:[EMF Forms]Text Box Sizes
Next Topic:[ECP]filter search model element
Goto Forum:
  


Current Time: Thu Apr 25 12:59:34 GMT 2024

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

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

Back to the top