Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Value of EnumerationImpl is not legal
Value of EnumerationImpl is not legal [message #874012] Sat, 19 May 2012 19:18 Go to next message
Eclipse UserFriend
Hello,

i've switched to the latest stable EMF/UML2. Most of my existing uml
models can be loaded now without problem except one. I get exception
specified below. Any ideas what i've did wrong (file with model itself
is attached)?

Thanks in advance

>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.uml2.uml.internal.impl.EnumerationImpl@825cf3 (name: CodeList.Wettbewerbsart, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false)' is not legal. (file:/model2/xhamsterzucht.uml, -1, -1)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:77)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:185)
> at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1284)
> at org.tzi.use.plugins.xmihandler.backend.XMIImporter.importFromXMI(XMIImporter.java:404)
> at org.tzi.use.plugins.xmihandler.XMIHandlerPlugin.importFromXMI(XMIHandlerPlugin.java:40)
> at org.tzi.use.plugins.xmihandler.gui.XMIHandlerView$1.doWork(XMIHandlerView.java:57)
> at org.tzi.use.plugins.xmihandler.gui.WaitDialog$2.construct(WaitDialog.java:62)
> at org.tzi.use.plugins.xmihandler.utils.SwingWorker$2.run(SwingWorker.java:112)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.uml2.uml.internal.impl.EnumerationImpl@825cf3 (name: CodeList.Wettbewerbsart, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false)' is not legal. (file:/model2/xhamsterzucht.uml, -1, -1)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2657)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1143)
> at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1222)
> at org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocument(UMLHandler.java:55)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:737)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:516)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
> ... 9 more
> Caused by: java.lang.UnsupportedOperationException
> at org.eclipse.emf.common.util.BasicEList$UnmodifiableEList.grow(BasicEList.java:1029)
> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:435)
> at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1185)
> at org.eclipse.emf.ecoError: Value 'org.eclipse.uml2.uml.internal.impl.EnumerationImpl@825cf3 (name: CodeList.Wettbewerbsart, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false)' is not legal. (file:/model2/xhamsterzucht.uml, -1, -1)re.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2652)
> ... 21 more
Re: Value of EnumerationImpl is not legal [message #874029 is a reply to message #874012] Sat, 19 May 2012 19:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4187
Registered: July 2009
Senior Member
Hi

It doesn't look like you've switched very successfully.

Are you using UMLResourcesUtil.init() ?

Your errors look very like bugs I reported in the M2/M3 time frame and
which were all fixed by M4.

Try rebuilding/cleaning/making sure that you have a coherent set of files.

In particular you need a latest EMF too, but P2 should tell you that;
report a bug if it doesn't.

Regards

Ed


On 19/05/2012 20:18, Emil Huseynli wrote:
> Hello,
>
> i've switched to the latest stable EMF/UML2. Most of my existing uml
> models can be loaded now without problem except one. I get exception
> specified below. Any ideas what i've did wrong (file with model itself
> is attached)?
>
> Thanks in advance
>
>>
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value
>> 'org.eclipse.uml2.uml.internal.impl.EnumerationImpl@825cf3 (name:
>> CodeList.Wettbewerbsart, visibility: <unset>) (isLeaf: false,
>> isAbstract: false, isFinalSpecialization: false)' is not legal.
>> (file:/model2/xhamsterzucht.uml, -1, -1)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:77)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:185)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1284)
>> at
>> org.tzi.use.plugins.xmihandler.backend.XMIImporter.importFromXMI(XMIImporter.java:404)
>> at
>> org.tzi.use.plugins.xmihandler.XMIHandlerPlugin.importFromXMI(XMIHandlerPlugin.java:40)
>> at
>> org.tzi.use.plugins.xmihandler.gui.XMIHandlerView$1.doWork(XMIHandlerView.java:57)
>> at
>> org.tzi.use.plugins.xmihandler.gui.WaitDialog$2.construct(WaitDialog.java:62)
>> at
>> org.tzi.use.plugins.xmihandler.utils.SwingWorker$2.run(SwingWorker.java:112)
>> at java.lang.Thread.run(Thread.java:662)
>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>> 'org.eclipse.uml2.uml.internal.impl.EnumerationImpl@825cf3 (name:
>> CodeList.Wettbewerbsart, visibility: <unset>) (isLeaf: false,
>> isAbstract: false, isFinalSpecialization: false)' is not legal.
>> (file:/model2/xhamsterzucht.uml, -1, -1)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2657)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1143)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1222)
>> at
>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocument(UMLHandler.java:55)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:737)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:516)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
>> ... 9 more
>> Caused by: java.lang.UnsupportedOperationException
>> at
>> org.eclipse.emf.common.util.BasicEList$UnmodifiableEList.grow(BasicEList.java:1029)
>> at
>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:435)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1185)
>> at org.eclipse.emf.ecoError: Value
>> 'org.eclipse.uml2.uml.internal.impl.EnumerationImpl@825cf3 (name:
>> CodeList.Wettbewerbsart, visibility: <unset>) (isLeaf: false,
>> isAbstract: false, isFinalSpecialization: false)' is not legal.
>> (file:/model2/xhamsterzucht.uml, -1,
>> -1)re.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2652)
>> ... 21 more
>
Re: Value of EnumerationImpl is not legal [message #874030 is a reply to message #874029] Sat, 19 May 2012 19:36 Go to previous messageGo to next message
Eclipse UserFriend
yes, i'm using UMLResourcesUtil.init(). here's a set of jars i'm using

org.eclipse.emf.common_2.8.0.v20120504-0433.jar
org.eclipse.emf.ecore.xmi_2.8.0.v20120504-0433.jar
org.eclipse.emf.ecore_2.8.0.v20120504-0433.jar
org.eclipse.emf.mapping.ecore2xml_2.7.0.v20120507-0712.jar
org.eclipse.uml2.common_1.7.0.v20120507-0907.jar
org.eclipse.uml2.uml.resources_4.0.0.v20120507-0907.jar
org.eclipse.uml2.types_1.0.0.v20120507-0907.jar
org.eclipse.uml2.uml_4.0.0.v20120507-0907.jar
org.eclipse.uml2.uml.profile.l2_1.0.0.v20120507-0907.jar
org.eclipse.uml2.uml.profile.l3_1.0.0.v20120507-0907.jar

On 19.05.2012 21:29, Ed Willink wrote:
> Hi
>
> It doesn't look like you've switched very successfully.
>
> Are you using UMLResourcesUtil.init() ?
>
> Your errors look very like bugs I reported in the M2/M3 time frame and
> which were all fixed by M4.
>
> Try rebuilding/cleaning/making sure that you have a coherent set of files.
>
> In particular you need a latest EMF too, but P2 should tell you that;
> report a bug if it doesn't.
>
> Regards
>
> Ed
Re: Value of EnumerationImpl is not legal [message #874285 is a reply to message #874029] Sun, 20 May 2012 11:57 Go to previous message
Eclipse UserFriend
solution for me here was just to stick with old versions of emf/uml2,
they are stable and well tested. i've just adapted UMLResourcesUtil
class to use with old emf/uml2 (trimmed out 4.0 related code).

On 19.05.2012 21:29, Ed Willink wrote:
>
> It doesn't look like you've switched very successfully.
>
> Your errors look very like bugs I reported in the M2/M3 time frame
>
Previous Topic:UML2 Versions
Next Topic:UML2 3.x Resources with 4.x
Goto Forum:
  


Current Time: Sat Dec 20 05:55:25 GMT 2014

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

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