Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF seems unable to read back what it wrote
EMF seems unable to read back what it wrote [message #1391246] Mon, 30 June 2014 16:35 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
I changed my model changing one EList<Double> to an EList<Point2D>.
I also added the required EDataType (Name: "Point"; Instance Type Name: "javafx.geometry.Point2D"; Serializable: "true").

This had devastating effects on serialization (XMI): apparently the model is written correctly
(obviously I had to reset the model), but it's not possible to read it back; I get following error.

load/save routines are not changed in a long time.
I am just using model creation in Standalone mode (no eclipse, I have a native JavaFX Application), no edit, no editor.

I must have done something really wrong :(

Please help!

TiA
Mauro

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Point2D [x = 0.0, y = 0.0]' is not legal. (file:/C:/Users/mcon/.Voith/data/default.hyconmde, 1177, 70)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at com.voith.hyconmde.core.AbstractModelService.getResource(AbstractModelService.java:100)
at com.voith.hyconmde.core.AbstractModelService.getRoot(AbstractModelService.java:168)
at com.voith.hyconmde.ui.VoithMDEApp$1.call(VoithMDEApp.java:145)
at com.voith.hyconmde.ui.VoithMDEApp$1.call(VoithMDEApp.java:1)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Point2D [x = 0.0, y = 0.0]' is not legal. (file:/C:/Users/mcon/.Voith/data/default.hyconmde, 1177, 70)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2671)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2656)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endElement(XMLHandler.java:1577)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1781)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2957)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 8 more
Caused by: java.lang.IllegalArgumentException: The value 'Point2D [x = 0.0, y = 0.0]' is invalid.
at org.eclipse.emf.ecore.impl.EFactoryImpl.createFromString(EFactoryImpl.java:471)
at com.voith.hyconmde.model.hyconmde.impl.HyconmdeFactoryImpl.createPointFromString(HyconmdeFactoryImpl.java:785)
at com.voith.hyconmde.model.hyconmde.impl.HyconmdeFactoryImpl.createFromString(HyconmdeFactoryImpl.java:140)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createFromString(XMLHelperImpl.java:1615)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1147)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2666)
... 27 more
2014-06-30 18:13:37 ERROR AbstractModelService:117 - org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Point2D [x = 0.0, y = 0.0]' is not legal. (file:/C:/Users/mcon/.Voith/data/default.hyconmde, 1177, 70)
2014-06-30 18:13:37 FATAL VoithMDEApp:163 - Unable to load main model
Re: EMF seems unable to read back what it wrote [message #1391292 is a reply to message #1391246] Mon, 30 June 2014 18:14 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
I found out my error.
Sorry for the noise.

Il 30/06/2014 18:35, Mauro Condarelli ha scritto:
> Hi,
> I changed my model changing one EList<Double> to an EList<Point2D>.
> I also added the required EDataType (Name: "Point"; Instance Type Name: "javafx.geometry.Point2D"; Serializable: "true").
>
> This had devastating effects on serialization (XMI): apparently the model is written correctly
> (obviously I had to reset the model), but it's not possible to read it back; I get following error.
>
> load/save routines are not changed in a long time.
> I am just using model creation in Standalone mode (no eclipse, I have a native JavaFX Application), no edit, no editor.
>
> I must have done something really wrong :(
>
> Please help!
>
> TiA
> Mauro
>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Point2D [x = 0.0, y = 0.0]' is not legal. (file:/C:/Users/mcon/.Voith/data/default.hyconmde, 1177, 70)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
> at com.voith.hyconmde.core.AbstractModelService.getResource(AbstractModelService.java:100)
> at com.voith.hyconmde.core.AbstractModelService.getRoot(AbstractModelService.java:168)
> at com.voith.hyconmde.ui.VoithMDEApp$1.call(VoithMDEApp.java:145)
> at com.voith.hyconmde.ui.VoithMDEApp$1.call(VoithMDEApp.java:1)
> at javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Point2D [x = 0.0, y = 0.0]' is not legal. (file:/C:/Users/mcon/.Voith/data/default.hyconmde, 1177, 70)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2671)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2656)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endElement(XMLHandler.java:1577)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1781)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2957)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
> at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
> ... 8 more
> Caused by: java.lang.IllegalArgumentException: The value 'Point2D [x = 0.0, y = 0.0]' is invalid.
> at org.eclipse.emf.ecore.impl.EFactoryImpl.createFromString(EFactoryImpl.java:471)
> at com.voith.hyconmde.model.hyconmde.impl.HyconmdeFactoryImpl.createPointFromString(HyconmdeFactoryImpl.java:785)
> at com.voith.hyconmde.model.hyconmde.impl.HyconmdeFactoryImpl.createFromString(HyconmdeFactoryImpl.java:140)
> at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createFromString(XMLHelperImpl.java:1615)
> at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1147)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2666)
> ... 27 more
> 2014-06-30 18:13:37 ERROR AbstractModelService:117 - org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Point2D [x = 0.0, y = 0.0]' is not legal. (file:/C:/Users/mcon/.Voith/data/default.hyconmde, 1177, 70)
> 2014-06-30 18:13:37 FATAL VoithMDEApp:163 - Unable to load main model
Previous Topic:Xcore and FeatureMaps
Next Topic:ECP with generics
Goto Forum:
  


Current Time: Thu Sep 19 10:21:19 GMT 2019

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

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

Back to the top