|
Re: EMF : Error loading XMI file [message #1690385 is a reply to message #1690321] |
Fri, 27 March 2015 05:22 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
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:
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03763 seconds