Skip to main content



      Home
Home » Modeling » EMF » EMF : Error loading XMI file(IllegalValueException when opening an XMI file using "Simple Reflective Ecore Model Editor)
EMF : Error loading XMI file [message #1690321] Thu, 26 March 2015 11:11 Go to next message
Eclipse UserFriend
When I try to open XMI file using Simple Reflective Ecore Model Editor, I get the following error : org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@9f8c5d (eClass: org.eclipse.emf.ecore.impl.EClassImpl@1cf9acb (name: PartnerLinkType) (instanceClassName: null) (abstract: false, interface: false))' is not legal. (platform:/resource/...).
.....
java.lang.ArrayStoreException: org.eclipse.emf.ecore.impl.DynamicEObjectImpl
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:118)
....

The XMI file is an instance of an ecore WSDL metamodel which refer to the partnerlinktype metamodel. The file to load refer to an object of Kind "PartnerLinkType" whose instance is contained in "PLNK "resource. The following XMI file fails to do that:
Re: EMF : Error loading XMI file [message #1690385 is a reply to message #1690321] Fri, 27 March 2015 01:22 Go to previous messageGo to next message
Eclipse UserFriend
Amel,

Probably there is a generated model for WSDL which you're extending,
right? Likely your extension PartnerLinkType EClass has whatever is the
EClass of the Definition.eExtensibilityElements reference's type is
(ExtensibilityElement?) as its eSuperType. But, the question is whether
your extension is using the generated WSDL model for this eSuperType
(ExtensibilityElement)? If not, the dynamic instance will not actually
reuse the generated base class from the WSDL model
(ExtensibilityElementImpl), which is apparently the case because it's
definitely using DynamicEObjectImpl according to your stack trace. Note
the features for models all support fail-fast type safety, so for a
generated model:

public EList<EEnumLiteral> getELiterals()
{
if (eLiterals == null)
{
eLiterals = new
EObjectContainmentWithInverseEList<EEnumLiteral>(EEnumLiteral.class,
this, EcorePackage.EENUM__ELITERALS, EcorePackage.EENUM_LITERAL__EENUM);
}
return eLiterals;
}

Note the first argument is the class literal and it must be the base
type of anything added to this list.

You can tell if your extension model is using the generated version of
WSDL if the reference in PartnerLinkType is using WSDL's eNS_URI value
to refer to ExtensibilityElement rather than a relative URI or
platform:/resource URI...


On 26/03/2015 4:11 PM, Amel B. wrote:
> When I try to open XMI file using Simple Reflective Ecore Model Editor, I get the following error : org.eclipse.emf.ecore.xmi.IllegalValueException: Value mailto:'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@9f8c5d (eClass: mailto:org.eclipse.emf.ecore.impl.EClassImpl@1cf9acb (name: PartnerLinkType) (instanceClassName: null) (abstract: false, interface: false))' is not legal. (platform:/resource/...).
> ....
> java.lang.ArrayStoreException: org.eclipse.emf.ecore.impl.DynamicEObjectImpl
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:118)
> ...
>
> The XMI file is an instance of an ecore WSDL metamodel which refer to the partnerlinktype metamodel. The file to load refer to an object of Kind "PartnerLinkType" whose instance is contained in "PLNK "resource. The following XMI file fails to do that:
>
Re: EMF : Error loading XMI file [message #1690559 is a reply to message #1690385] Sat, 28 March 2015 17:19 Go to previous message
Eclipse UserFriend
Ed,
the issue is solved. You are right, the PartnerLinkType used platform:/resource URI to refer to ExtensibilityElement rather than using WSDL's eNS_URI.
Thanks so much for your help!
Previous Topic:EMF : Error loading XMI file
Next Topic:EMF : Code generation from ecore and genmodel
Goto Forum:
  


Current Time: Wed Jul 23 14:35:18 EDT 2025

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

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

Back to the top