Problems to open a XMI file using the Sample Reflective Ecore Model Editor [message #1855904] |
Wed, 09 November 2022 11:00 |
Jose Alejandro Concepcion Alvarez Messages: 11 Registered: June 2022 |
Junior Member |
|
|
I have a XMI file that is the implementation of a aadl model from the OSATE software. This file is a .aaxl2 model. First I try to open this file in Eclipse Epsilun with the open with "Sample Reflective Ecore Model Editor" in order to get the ecore model from that .aaxl2. but I always get the following error:
"org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@63112b (eProxyURI: platform:/resource/ClientServer.aadl#ClientServer.ClientServer.impl eClass: org.eclipse.emf.ecore.impl.EClassImpl@117e7b16 (name: SystemImplementation) (instanceClassName: null) (abstract: false, interface: false))' is not legal. (platform:/resource/TestExample/ClientServer_ClientServer_impl_Instance.aaxl2, 8, 126)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2715)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2700)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2159)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2085)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:151)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1894)
..... "
" org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@63112b (eProxyURI: platform:/resource/ClientServer.aadl#ClientServer.ClientServer.impl eClass: org.eclipse.emf.ecore.impl.EClassImpl@117e7b16 (name: SystemImplementation) (instanceClassName: null) (abstract: false, interface: false))' is not legal. (platform:/resource/TestExample/ClientServer_ClientServer_impl_Instance.aaxl2, 8, 126)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2715)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2700)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2159)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2085)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:151)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1894)
..... "
I try to do it programatically but when I excecute the following code to load the resource from a URI
Resource resource = this.resourceSet.getResource(URI.createFileURI(modelUri), true);
resource.load(null);
I got the following error:
Error: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://aadl.info/AADL/2.0/instance' not found. (file:/mnt/DATA/00-GSSI/00-WORK/EXAMPLE/output-processing/xmi/0_models-repo_SecuritySystem_with_devices_Instance.aaxl2, 2, 287)
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://aadl.info/AADL/2.0/instance' not found. (file:/mnt/DATA/00-GSSI/00-WORK/EXAMPLE/output-processing/xmi/0_models-repo_SecuritySystem_with_devices_Instance.aaxl2, 2, 287)
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)
Its there is a way to perform this ?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03609 seconds