Home » Modeling » UML2 » Migration from UML2 3.2.0 to 4.0 with Profiles and Stereotypes
Migration from UML2 3.2.0 to 4.0 with Profiles and Stereotypes [message #1007411] |
Tue, 05 February 2013 18:48 |
Fredrik Robertssen Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi,
I upgraded to UML 4.0 and have some troubles reading the models when it comes to stereotypes.
The model was saved with UML2 3.2, (ergo XMI 2.1) and included a profile that was applied with the dynamic technique.
Now, when loading the model with UML 4.0, i receive the following exception:
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value '250' is not legal. (platform:/resource/example/Test.uml, 65, 132)
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)
at org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.loadResource(AdapterFactoryEditingDomain.java:405)
The line where loading fails is a stereotype, and the value an stored UMLPrimitiveTypes::String
Any idea why this happens?
Now, vice-versa, when I create a new model and save it useing UML 4.0, the values of the stereotypes (again, UMLPrimitiveTypes::String), are stored in a "strange" way:
<graphics:Shape xmi:id="_w4hNkPaXEeG_Gb8QAQ0kdw" x="ACED0005740003313830" y="ACED00057400023535" width="ACED0005740003363133" height="ACED00057400023534" base_Element="_wlI-kPaXEeG_Gb8QAQ0kdw"/>
Is this some sort of reference? If, so, I do not find where they point to.
Is there something I have not seen? I have read the migration guide, and I have tried to update the original profile specification, but it did not seem to change things.
Thanks for any help in advance!
|
|
|
Re: Migration from UML2 3.2.0 to 4.0 with Profiles and Stereotypes [message #1007425 is a reply to message #1007411] |
Tue, 05 February 2013 19:45 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
I cannot comment on the first example that is specific to your models.
The XMI serialization of stereotype applications has always been wierd
in my opinion, using XMI directly to avoid defining a proper object.
Regards
Ed Willink
On 05/02/2013 18:48, Fredrik Robertssen wrote:
> Hi,
>
> I upgraded to UML 4.0 and have some troubles reading the models when
> it comes to stereotypes.
>
> The model was saved with UML2 3.2, (ergo XMI 2.1) and included a
> profile that was applied with the dynamic technique.
>
> Now, when loading the model with UML 4.0, i receive the following
> exception:
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value '250' is not
> legal. (platform:/resource/example/Test.uml, 65, 132)
> 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)
> at
> org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.loadResource(AdapterFactoryEditingDomain.java:405)
>
> The line where loading fails is a stereotype, and the value an stored
> UMLPrimitiveTypes::String
>
> Any idea why this happens?
>
> Now, vice-versa, when I create a new model and save it useing UML 4.0,
> the values of the stereotypes (again, UMLPrimitiveTypes::String), are
> stored in a "strange" way:
> <graphics:Shape xmi:id="_w4hNkPaXEeG_Gb8QAQ0kdw"
> x="ACED0005740003313830" y="ACED00057400023535"
> width="ACED0005740003363133" height="ACED00057400023534"
> base_Element="_wlI-kPaXEeG_Gb8QAQ0kdw"/>
>
>
> Is this some sort of reference? If, so, I do not find where they point
> to.
>
> Is there something I have not seen? I have read the migration guide,
> and I have tried to update the original profile specification, but it
> did not seem to change things.
> Thanks for any help in advance!
>
|
|
|
Re: Migration from UML2 3.2.0 to 4.0 with Profiles and Stereotypes [message #1007680 is a reply to message #1007411] |
Thu, 07 February 2013 04:48 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Fredrik,
Both the exception and sample XMI seem odd to me. Are you doing this
with a standalone application or from the UML editor in Eclipse? Note
that there were a number of issues with support for legacy profiles in
4.0 which have been fixed in 4.0.x releases...
Kenn
On 13-02-05 1:48 PM, Fredrik Robertssen wrote:
> Hi,
>
> I upgraded to UML 4.0 and have some troubles reading the models when it
> comes to stereotypes.
>
> The model was saved with UML2 3.2, (ergo XMI 2.1) and included a profile
> that was applied with the dynamic technique.
>
> Now, when loading the model with UML 4.0, i receive the following
> exception:
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value '250' is not
> legal. (platform:/resource/example/Test.uml, 65, 132)
> 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)
>
> at
> org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.loadResource(AdapterFactoryEditingDomain.java:405)
>
>
> The line where loading fails is a stereotype, and the value an stored
> UMLPrimitiveTypes::String
>
> Any idea why this happens?
>
> Now, vice-versa, when I create a new model and save it useing UML 4.0,
> the values of the stereotypes (again, UMLPrimitiveTypes::String), are
> stored in a "strange" way:
> <graphics:Shape xmi:id="_w4hNkPaXEeG_Gb8QAQ0kdw"
> x="ACED0005740003313830" y="ACED00057400023535"
> width="ACED0005740003363133" height="ACED00057400023534"
> base_Element="_wlI-kPaXEeG_Gb8QAQ0kdw"/>
>
>
> Is this some sort of reference? If, so, I do not find where they point to.
>
> Is there something I have not seen? I have read the migration guide, and
> I have tried to update the original profile specification, but it did
> not seem to change things.
> Thanks for any help in advance!
>
|
|
|
Re: Migration from UML2 3.2.0 to 4.0 with Profiles and Stereotypes [message #1008096 is a reply to message #1007680] |
Fri, 08 February 2013 22:39 |
Fredrik Robertssen Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi Ken,
this happens in a plugin that loads UML models, within Eclipse. But I have tried to open the *.uml files also in the UML 2 Editor in Eclipse, with basically the same exception:
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value '180' is not legal. (platform:/resource/GUI.uml, 112, 131)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2671)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2725)
at org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAttribs(SAXXMIHandler.java:79)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2200)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1337)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1475)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1026)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:81)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:163)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
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)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1529)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1308)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 8 more
Caused by: java.lang.NullPointerException
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1121)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2666)
... 36 more
Since you mentioned that some legacy issues have been fixed, I have tried with both UML 4.0.1 and especially 4.1.0 M5, with the same behavior. I have also re-applied the profile.
Is there anything else that has been changed from UML 3.2.0 towards 4.0 that could cause this?
The profile is stored in a plugin and contributed by a pathmap, via extension point org.eclipse.emf.ecore.uri_mapping.
Thanks for al feedback,
Fredrik
|
|
|
Re: Migration from UML2 3.2.0 to 4.0 with Profiles and Stereotypes [message #1008100 is a reply to message #1008096] |
Fri, 08 February 2013 23:04 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Hmm, it's hard to tell what's happening from the stack trace along. If
you can share a representative profile that demonstrates the problem
I'll try to debug it to figure out what's happening...
Kenn
On 13-02-08 5:39 PM, Fredrik Robertssen wrote:
> Hi Ken,
>
> this happens in a plugin that loads UML models, within Eclipse. But I
> have tried to open the *.uml files also in the UML 2 Editor in Eclipse,
> with basically the same exception:
>
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value '180'
> is not legal. (platform:/resource/GUI.uml, 112, 131)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2671)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2725)
>
> at
> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAttribs(SAXXMIHandler.java:79)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2200)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1337)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1475)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1026)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:81)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719)
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:163)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
>
> 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)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1529)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1308)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
>
> ... 8 more
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1121)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2666)
>
> ... 36 more
>
>
> Since you mentioned that some legacy issues have been fixed, I have
> tried with both UML 4.0.1 and especially 4.1.0 M5, with the same
> behavior. I have also re-applied the profile.
> Is there anything else that has been changed from UML 3.2.0 towards 4.0
> that could cause this?
> The profile is stored in a plugin and contributed by a pathmap, via
> extension point org.eclipse.emf.ecore.uri_mapping.
> Thanks for al feedback,
>
> Fredrik
|
|
| | |
Goto Forum:
Current Time: Mon Sep 23 19:39:39 GMT 2024
Powered by FUDForum. Page generated in 0.12549 seconds
|