Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problems to open a XMI file using the Sample Reflective Ecore Model Editor(Problems to open a XMI file using the Sample Reflective Ecore Model Editor)
Problems to open a XMI file using the Sample Reflective Ecore Model Editor [message #1855904] Wed, 09 November 2022 11:00 Go to next message
Jose Alejandro Concepcion Alvarez is currently offline Jose Alejandro Concepcion AlvarezFriend
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 ?
Re: Problems to open a XMI file using the Sample Reflective Ecore Model Editor [message #1855910 is a reply to message #1855904] Wed, 09 November 2022 12:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Is the generated model with nsURI http://aadl.info/AADL/2.0/instance installed in your IDE?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problems to open a XMI file using the Sample Reflective Ecore Model Editor [message #1855911 is a reply to message #1855910] Wed, 09 November 2022 12:42 Go to previous messageGo to next message
Jose Alejandro Concepcion Alvarez is currently offline Jose Alejandro Concepcion AlvarezFriend
Messages: 11
Registered: June 2022
Junior Member
Yes it is
this is the XML model

<?xml version="1.0" encoding="ASCII"?>
<instance:SystemInstance xmi:version="2.0"
  xmlns:xmi="http://www.omg.org/XMI"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:aadl2="http://aadl.info/AADL/2.0"
  xmlns:instance="http://aadl.info/AADL/2.0/instance" name="ClientServer_impl_Instance" category="system">
  <systemOperationMode name="No Modes"/>
  <componentImplementation xsi:type="aadl2:SystemImplementation" href="../ClientServer.aadl#ClientServer.ClientServer.impl"/>
</instance:SystemInstance>
Re: Problems to open a XMI file using the Sample Reflective Ecore Model Editor [message #1855913 is a reply to message #1855911] Wed, 09 November 2022 14:25 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
It's really hard to "debug" problems with little snips. The use of org.eclipse.emf.ecore.impl.DynamicEObjectImpl suggests that a generated model was not found. The programmatic example suggests that the generate package is not available, if you are running stand-alone, that package hasn't initialized itself. If your question is more Epsilon related, it might be better to ask on their specific forum:

https://www.eclipse.org/forums/index.php/f/22/


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Cycle detection in URIConverter prefix expansion
Next Topic:Memory disposal during unload()
Goto Forum:
  


Current Time: Thu Apr 25 05:15:49 GMT 2024

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

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

Back to the top