[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: "Initialize by loading" & DocumentRoot

Fabrice,

So this has nothing to do with RCP anyway. Yet all this works for me. I vaguely recall Dave having done something related to this which caused a problem that was subsequently fixed. Please try the M2 build when it comes out, or the most recent I build. Sorry for the hassle...


Fabrice Dubach wrote:
The exemple test code failed, the console output is :

Enter a list of file paths or URIs that have content like this:
Exception in thread "main" java.lang.ClassCastException: The feature 'library's type 'null' does not permit a value of type 'Library'
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2909)
at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:181)
at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:102)
at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1216)
at com.example.library.impl.DocumentRootImpl.setLibrary(DocumentRootImpl.java:156)
at com.example.library.tests.LibraryExample.main(LibraryExample.java:70)


What I saw when I tryed to debug my own model (before I found that a simplier model like the library's one could reproduce this behavior) is that the EStructuralFeature objects was well instanciated (including the name attribute), but not its EType attribut. So, in the createInitialModel, the eStructuralFeature is found but it is the EcoreUtil.create which failed.