Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UML2 / Sequence diagram / MessageKind
UML2 / Sequence diagram / MessageKind [message #476692] Sun, 02 December 2007 11:03 Go to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello there,

I have discovered the following problem: While reading an xmi file which
contains a UML sequence diagram model (created and exported with Enteprise
Architect), the following exception is being thrown:

org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
legal. (...)

The xmi file defines the following:

(...)
<message xmi:type="uml:Message"
xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
(...)

According to the description of the exception, the "messageKind" cannot
have the value "complete", but according to the UML specification (from
http://www.omg.org/docs/formal/07-02-03.pdf):

14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
that identifies the type of message.
Generalizations
None
Description
MessageKind is an enumeration of the following values:
• complete = sendEvent and receiveEvent are present.
• lost = sendEvent present and receiveEvent absent.
• found = sendEvent absent and receiveEvent present.
• unknown = sendEvent and receiveEvent absent (should not appear).


Therefore the "complete" message kind is correct! I cannot find any error
in my code, while I'm simply reading the whole model from the xmi like
this:

Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
UMLPackage.Literals.MODEL);


Is it a possible bug in the underlying EMF Metamodel for UML? I have tried
it with simple messages and signals being sent between the lifelines. The
effect is the same. Has anybody have the same problems with sequence
diagrams?

I'm using:
Eclipse 3.3.1
EMF 2.3.1
UML2 2.1.1




Thanks in advance for any suggestions,

Michael Mlynarski
Re: UML2 / Sequence diagram / MessageKind [message #476694 is a reply to message #476692] Mon, 03 December 2007 11:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Michael,

In my experience, usually the IllegalValueException is caused by some
other exception, because this is just a Resource.Diagnostic indicating
that the something went wrong in setting an EStructuralFeature value. One
problem I've seen before is that an attribute of type String could not be
set because I had a bad UML2 build (or mismatch between EMF and UML2
versions), in which the uml::String EDataType thought its classifier ID
was 2 but the UMLPackage thought it should be 265 or some such. The
result was that the UMLFactory::createFromString(EDataType, String) method
could not deserialize string values.

Can you post the whole stack trace, including any "Caused by:" exceptions?

Thanks,

Christian

Michael Mlynarski wrote:

> Hello there,

> I have discovered the following problem: While reading an xmi file which
> contains a UML sequence diagram model (created and exported with Enteprise
> Architect), the following exception is being thrown:

> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
> legal. (...)

-----8<-----

> Thanks in advance for any suggestions,

> Michael Mlynarski
Re: UML2 / Sequence diagram / MessageKind [message #476695 is a reply to message #476694] Mon, 03 December 2007 20:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello Christian,

thanks for your tipp. Unfortunately the are no further exceptions being
thrown. The stack trace looks like this:

org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
java.lang.NullPointerException
at de.mlynarski.utils.LoadUML.load(LoadUML.java:53)
at de.mlynarski.utils.LoadUML.main(LoadUML.java:76)

I have tried to debug my application. There is no "detailMessage" in the
exception. The main cause is an NullPointerException.

The sequence diagram isn't very complex. Regrettably the same error occurs,
when I try to load a communication diagram (which is very similar to the
sequence diagram). I don't have a clue if it is a problem in the model
itself (xmi file) or the uml2 api.


Greetings,
Michael



"Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
news:8d2f6de5b356efc7761f07c737830ae2$1@www.eclipse.org...
> Hi, Michael,
>
> In my experience, usually the IllegalValueException is caused by some
> other exception, because this is just a Resource.Diagnostic indicating
> that the something went wrong in setting an EStructuralFeature value. One
> problem I've seen before is that an attribute of type String could not be
> set because I had a bad UML2 build (or mismatch between EMF and UML2
> versions), in which the uml::String EDataType thought its classifier ID
> was 2 but the UMLPackage thought it should be 265 or some such. The
> result was that the UMLFactory::createFromString(EDataType, String) method
> could not deserialize string values.
>
> Can you post the whole stack trace, including any "Caused by:" exceptions?
>
> Thanks,
>
> Christian
>
> Michael Mlynarski wrote:
>
>> Hello there,
>
>> I have discovered the following problem: While reading an xmi file which
>> contains a UML sequence diagram model (created and exported with
>> Enteprise Architect), the following exception is being thrown:
>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (...)
>
> -----8<-----
>
>> Thanks in advance for any suggestions,
>
>> Michael Mlynarski
>
Re: UML2 / Sequence diagram / MessageKind [message #476696 is a reply to message #476695] Tue, 04 December 2007 14:50 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Michael,

Would it be possible to post a section of your model that is causing the
problem? Or if you have steps on recreating the model to reproduce the
error?

- James.


"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fj1pnq$sc4$1@build.eclipse.org...
> Hello Christian,
>
> thanks for your tipp. Unfortunately the are no further exceptions being
> thrown. The stack trace looks like this:
>
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
> legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
> java.lang.NullPointerException
> at de.mlynarski.utils.LoadUML.load(LoadUML.java:53)
> at de.mlynarski.utils.LoadUML.main(LoadUML.java:76)
>
> I have tried to debug my application. There is no "detailMessage" in the
> exception. The main cause is an NullPointerException.
>
> The sequence diagram isn't very complex. Regrettably the same error
> occurs, when I try to load a communication diagram (which is very similar
> to the sequence diagram). I don't have a clue if it is a problem in the
> model itself (xmi file) or the uml2 api.
>
>
> Greetings,
> Michael
>
>
>
> "Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
> news:8d2f6de5b356efc7761f07c737830ae2$1@www.eclipse.org...
>> Hi, Michael,
>>
>> In my experience, usually the IllegalValueException is caused by some
>> other exception, because this is just a Resource.Diagnostic indicating
>> that the something went wrong in setting an EStructuralFeature value.
>> One problem I've seen before is that an attribute of type String could
>> not be set because I had a bad UML2 build (or mismatch between EMF and
>> UML2 versions), in which the uml::String EDataType thought its classifier
>> ID was 2 but the UMLPackage thought it should be 265 or some such. The
>> result was that the UMLFactory::createFromString(EDataType, String)
>> method could not deserialize string values.
>>
>> Can you post the whole stack trace, including any "Caused by:"
>> exceptions?
>>
>> Thanks,
>>
>> Christian
>>
>> Michael Mlynarski wrote:
>>
>>> Hello there,
>>
>>> I have discovered the following problem: While reading an xmi file which
>>> contains a UML sequence diagram model (created and exported with
>>> Enteprise Architect), the following exception is being thrown:
>>
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>>> legal. (...)
>>
>> -----8<-----
>>
>>> Thanks in advance for any suggestions,
>>
>>> Michael Mlynarski
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476697 is a reply to message #476692] Tue, 04 December 2007 18:00 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

I suspect you are seeing this error because the property is read-only. The
UML2 resource implementation doesn't expect to see values for the
Message::messageKind property in a serialization because its value is
derived based on the presence/absence of send/receive events.

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
> Hello there,
>
> I have discovered the following problem: While reading an xmi file which
> contains a UML sequence diagram model (created and exported with Enteprise
> Architect), the following exception is being thrown:
>
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
> legal. (...)
>
> The xmi file defines the following:
> (...)
> <message xmi:type="uml:Message"
> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
> name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
> (...)
>
> According to the description of the exception, the "messageKind" cannot
> have the value "complete", but according to the UML specification (from
> http://www.omg.org/docs/formal/07-02-03.pdf):
>
> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
> that identifies the type of message.
> Generalizations
> None
> Description
> MessageKind is an enumeration of the following values:
>
Re: UML2 / Sequence diagram / MessageKind [message #476700 is a reply to message #476696] Tue, 04 December 2007 22:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello James,

my model looks like this:

<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmi:version="2.1" xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
<uml:Model xmi:type="uml:Model" name="EA_Model" visibility="public">
<packagedElement xmi:type="uml:Package"
xmi:id="EAPK_EB4DBC17_1A70_448e_99EA_E895862CB6FD" name="System Model 1"
visibility="public">
<packagedElement xmi:type="uml:Collaboration"
xmi:id="EAID_CB000000_C17_1A70_448e_99EA_E895862CB6F"
name="EA_Collaboration1" visibility="public">
<ownedBehavior xmi:type="uml:Interaction"
xmi:id="EAID_IN000000_C17_1A70_448e_99EA_E895862CB6F" name="EA_Interaction1"
visibility="public">
<fragment xmi:type="uml:OccurrenceSpecification"
xmi:id="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
covered="EAID_LL000000_E475_4fdd_A45B_0AC888D8AD60"/>
<fragment xmi:type="uml:OccurrenceSpecification"
xmi:id="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
covered="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
<message xmi:type="uml:Message"
xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_E475_4fdd_A45B_0AC888D8AD60" name="Customer"
visibility="public"
represents="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_10FB_4692_A8AD_1D7E967829D3" name="cart"
visibility="public"
represents="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_C1DE_4bc7_AEAD_CAA654072E62" name="cartItem"
visibility="public"
represents="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_914B_413a_8366_C725EE082E00" name="product"
visibility="public"
represents="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
visibility="public"
represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
</ownedBehavior>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
<type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
<type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
<type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
<type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
<type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Actor"
xmi:id="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60" name="Customer"
visibility="public"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3" name="cart"
visibility="public" classifier="EAID_B1DDA8F9_85B5_41d5_8F8A_0C0243351763"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62" name="cartItem"
visibility="public" classifier="EAID_1ACE73ED_22D5_442d_AF33_F79C3F3E6A45"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_A8D37607_914B_413a_8366_C725EE082E00" name="product"
visibility="public" classifier="EAID_C2DE150C_FC45_4cd6_B82C_8C5769DC27B9"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653" name="shop"
visibility="public" classifier="EAID_2D4B9681_6BA6_4b39_AF79_739217DA58D0"/>
</packagedElement>
</uml:Model>
</xmi:XMI>



Each message has an attribute messageKind with the value "complete". This is
causing the "value is not legal" error.
I've extended my model with more messages and more lifelines. The exception
being thrown now is larger:


org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
at de.mlynarski.utils.LoadUML.main(LoadUML.java:73)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
is not legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2578)
at
org.eclipse.uml2.uml.internal.resource.UMLHandler.handleObje ctAttribs(UMLHandler.java:136)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2058)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTy peName(XMLHandler.java:1961)
at
org.eclipse.uml2.uml.internal.resource.UML22UMLHandler.creat eObject(UML22UMLHandler.java:62)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1679)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:974)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:87)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:953)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:684)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
... 3 more
Caused by: java.lang.NullPointerException
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDerivedStructur alFeatureID(BasicEObjectImpl.java:1477)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:999)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:994)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:989)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eOpenSet(BasicEO bjectImpl.java:1129)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1108)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1101)
at
org.eclipse.uml2.uml.internal.impl.MessageImpl.eSet(MessageI mpl.java:772)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1141)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
... 32 more



I would be very grateful for any suggestions!

Thanks in advance,
Michael


"James Bruck" <jbruck@ca.ibm.com> schrieb im Newsbeitrag
news:fj3pet$8lg$1@build.eclipse.org...
> Hi Michael,
>
> Would it be possible to post a section of your model that is causing the
> problem? Or if you have steps on recreating the model to reproduce the
> error?
>
> - James.
>
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fj1pnq$sc4$1@build.eclipse.org...
>> Hello Christian,
>>
>> thanks for your tipp. Unfortunately the are no further exceptions being
>> thrown. The stack trace looks like this:
>>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
>> java.lang.NullPointerException
>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:53)
>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:76)
>>
>> I have tried to debug my application. There is no "detailMessage" in the
>> exception. The main cause is an NullPointerException.
>>
>> The sequence diagram isn't very complex. Regrettably the same error
>> occurs, when I try to load a communication diagram (which is very similar
>> to the sequence diagram). I don't have a clue if it is a problem in the
>> model itself (xmi file) or the uml2 api.
>>
>>
>> Greetings,
>> Michael
>>
>>
>>
>> "Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
>> news:8d2f6de5b356efc7761f07c737830ae2$1@www.eclipse.org...
>>> Hi, Michael,
>>>
>>> In my experience, usually the IllegalValueException is caused by some
>>> other exception, because this is just a Resource.Diagnostic indicating
>>> that the something went wrong in setting an EStructuralFeature value.
>>> One problem I've seen before is that an attribute of type String could
>>> not be set because I had a bad UML2 build (or mismatch between EMF and
>>> UML2 versions), in which the uml::String EDataType thought its
>>> classifier ID was 2 but the UMLPackage thought it should be 265 or some
>>> such. The result was that the UMLFactory::createFromString(EDataType,
>>> String) method could not deserialize string values.
>>>
>>> Can you post the whole stack trace, including any "Caused by:"
>>> exceptions?
>>>
>>> Thanks,
>>>
>>> Christian
>>>
>>> Michael Mlynarski wrote:
>>>
>>>> Hello there,
>>>
>>>> I have discovered the following problem: While reading an xmi file
>>>> which contains a UML sequence diagram model (created and exported with
>>>> Enteprise Architect), the following exception is being thrown:
>>>
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>> not legal. (...)
>>>
>>> -----8<-----
>>>
>>>> Thanks in advance for any suggestions,
>>>
>>>> Michael Mlynarski
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476701 is a reply to message #476697] Wed, 05 December 2007 07:51 Go to previous messageGo to next message
chris is currently offline chrisFriend
Messages: 72
Registered: July 2009
Member
Kenn,

shouldn't UML2 be more flexible in this case? I think ignoring the value
(and maybe complaining if it's not consistent with the derived value)
seems to be more appropriate to me... Do you want me to file a bug on that?

Cheers,
Chris


Kenn Hussey schrieb:
> Michael,
>
> I suspect you are seeing this error because the property is read-only. The
> UML2 resource implementation doesn't expect to see values for the
> Message::messageKind property in a serialization because its value is
> derived based on the presence/absence of send/receive events.
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>> Hello there,
>>
>> I have discovered the following problem: While reading an xmi file which
>> contains a UML sequence diagram model (created and exported with Enteprise
>> Architect), the following exception is being thrown:
>>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (...)
>>
>> The xmi file defines the following:
>> (...)
>> <message xmi:type="uml:Message"
>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>> name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>> (...)
>>
>> According to the description of the exception, the "messageKind" cannot
>> have the value "complete", but according to the UML specification (from
>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>
>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>> that identifies the type of message.
>> Generalizations
>> None
>> Description
>> MessageKind is an enumeration of the following values:
>> • complete = sendEvent and receiveEvent are present.
>> • lost = sendEvent present and receiveEvent absent.
>> • found = sendEvent absent and receiveEvent present.
>> • unknown = sendEvent and receiveEvent absent (should not appear).
>>
>>
>> Therefore the "complete" message kind is correct! I cannot find any error
>> in my code, while I'm simply reading the whole model from the xmi like
>> this:
>>
>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>> UMLPackage.Literals.MODEL);
>>
>>
>> Is it a possible bug in the underlying EMF Metamodel for UML? I have tried
>> it with simple messages and signals being sent between the lifelines. The
>> effect is the same. Has anybody have the same problems with sequence
>> diagrams?
>>
>> I'm using:
>> Eclipse 3.3.1
>> EMF 2.3.1
>> UML2 2.1.1
>>
>>
>>
>>
>> Thanks in advance for any suggestions,
>>
>> Michael Mlynarski
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476702 is a reply to message #476697] Wed, 05 December 2007 11:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello there,

I've tried to manually delete the 'messageKind="complete"' attribute from
the XML file. Unfortunately futher exceptions are being thrown. What am I
doing wrong? I've attached my model to this e-mail.

The exception being thrown:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a (name:
shop, visibility: <unset>) (visibility: public)' is not legal.
(file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a (name:
shop, visibility: <unset>) (visibility: public)' is not legal.
(file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
at
org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
... 3 more
Caused by: java.lang.ArrayStoreException
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
... 20 more



Thanks in advance,
Michael




"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fj44ki$u1k$1@build.eclipse.org...
> Michael,
>
> I suspect you are seeing this error because the property is read-only. The
> UML2 resource implementation doesn't expect to see values for the
> Message::messageKind property in a serialization because its value is
> derived based on the presence/absence of send/receive events.
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>> Hello there,
>>
>> I have discovered the following problem: While reading an xmi file which
>> contains a UML sequence diagram model (created and exported with
>> Enteprise
>> Architect), the following exception is being thrown:
>>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (...)
>>
>> The xmi file defines the following:
>> (...)
>> <message xmi:type="uml:Message"
>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>> name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>> (...)
>>
>> According to the description of the exception, the "messageKind" cannot
>> have the value "complete", but according to the UML specification (from
>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>
>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>> that identifies the type of message.
>> Generalizations
>> None
>> Description
>> MessageKind is an enumeration of the following values:
>> . complete = sendEvent and receiveEvent are present.
>> . lost = sendEvent present and receiveEvent absent.
>> . found = sendEvent absent and receiveEvent present.
>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>
>>
>> Therefore the "complete" message kind is correct! I cannot find any error
>> in my code, while I'm simply reading the whole model from the xmi like
>> this:
>>
>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>> UMLPackage.Literals.MODEL);
>>
>>
>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>> tried
>> it with simple messages and signals being sent between the lifelines. The
>> effect is the same. Has anybody have the same problems with sequence
>> diagrams?
>>
>> I'm using:
>> Eclipse 3.3.1
>> EMF 2.3.1
>> UML2 2.1.1
>>
>>
>>
>>
>> Thanks in advance for any suggestions,
>>
>> Michael Mlynarski
>>
>>
>
>


Re: UML2 / Sequence diagram / MessageKind [message #476708 is a reply to message #476702] Thu, 06 December 2007 14:53 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

The format of your mode suggests that it's a UML 2.1(.x) model since it
contains 'packagedElement' elements... but the namespace declaration
(http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of the
Package metaclass was renamed to 'packagedElement' in UML 2.1...

Kenn


"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fj62em$qud$1@build.eclipse.org...
> Hello there,
>
> I've tried to manually delete the 'messageKind="complete"' attribute from
> the XML file. Unfortunately futher exceptions are being thrown. What am I
> doing wrong? I've attached my model to this e-mail.
>
> The exception being thrown:
>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
> at
> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
> Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
> ... 3 more
> Caused by: java.lang.ArrayStoreException
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
> ... 20 more
>
>
>
> Thanks in advance,
> Michael
>
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fj44ki$u1k$1@build.eclipse.org...
>> Michael,
>>
>> I suspect you are seeing this error because the property is read-only.
>> The
>> UML2 resource implementation doesn't expect to see values for the
>> Message::messageKind property in a serialization because its value is
>> derived based on the presence/absence of send/receive events.
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>> Hello there,
>>>
>>> I have discovered the following problem: While reading an xmi file which
>>> contains a UML sequence diagram model (created and exported with
>>> Enteprise
>>> Architect), the following exception is being thrown:
>>>
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>>> legal. (...)
>>>
>>> The xmi file defines the following:
>>> (...)
>>> <message xmi:type="uml:Message"
>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>> name="loginCustomer(char)" messageKind="complete"
>>> messageSort="synchCall"
>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>> (...)
>>>
>>> According to the description of the exception, the "messageKind" cannot
>>> have the value "complete", but according to the UML specification (from
>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>
>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>>> that identifies the type of message.
>>> Generalizations
>>> None
>>> Description
>>> MessageKind is an enumeration of the following values:
>>> . complete = sendEvent and receiveEvent are present.
>>> . lost = sendEvent present and receiveEvent absent.
>>> . found = sendEvent absent and receiveEvent present.
>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>
>>>
>>> Therefore the "complete" message kind is correct! I cannot find any
>>> error
>>> in my code, while I'm simply reading the whole model from the xmi like
>>> this:
>>>
>>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.MODEL);
>>>
>>>
>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>> tried
>>> it with simple messages and signals being sent between the lifelines.
>>> The
>>> effect is the same. Has anybody have the same problems with sequence
>>> diagrams?
>>>
>>> I'm using:
>>> Eclipse 3.3.1
>>> EMF 2.3.1
>>> UML2 2.1.1
>>>
>>>
>>>
>>>
>>> Thanks in advance for any suggestions,
>>>
>>> Michael Mlynarski
>>>
>>>
>>
>>
>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476709 is a reply to message #476701] Thu, 06 December 2007 15:03 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Chris,

This behavior is being provided by the EMF - when an attempt to set the
value for a feature fails, the exception is wrapped in an
IllegalValueException and added to the list of errors for the resource.
Unfortunately, it may seem like the entire load has failed since calls to
ResourceSet#getResource(URI, boolean) won't return a result. One way to work
around this would be to write code more like this:

Resource resource = null;
try {
resource = resourceSet.getResource(uri, true);
}catch (Exception e) {
resource = resourceSet.getResource(uri, false);
if (resource != null) {
// inspect list of errors returned by resource.getErrors()
}
}

Kenn

"chris" <chris_42@gmx.net> wrote in message
news:fj5l9m$v9d$1@build.eclipse.org...
> Kenn,
>
> shouldn't UML2 be more flexible in this case? I think ignoring the value
> (and maybe complaining if it's not consistent with the derived value)
> seems to be more appropriate to me... Do you want me to file a bug on
> that?
>
> Cheers,
> Chris
>
>
> Kenn Hussey schrieb:
>> Michael,
>>
>> I suspect you are seeing this error because the property is read-only.
>> The
>> UML2 resource implementation doesn't expect to see values for the
>> Message::messageKind property in a serialization because its value is
>> derived based on the presence/absence of send/receive events.
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>> Hello there,
>>>
>>> I have discovered the following problem: While reading an xmi file which
>>> contains a UML sequence diagram model (created and exported with
>>> Enteprise
>>> Architect), the following exception is being thrown:
>>>
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>>> legal. (...)
>>>
>>> The xmi file defines the following:
>>> (...)
>>> <message xmi:type="uml:Message"
>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>> name="loginCustomer(char)" messageKind="complete"
>>> messageSort="synchCall"
>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>> (...)
>>>
>>> According to the description of the exception, the "messageKind" cannot
>>> have the value "complete", but according to the UML specification (from
>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>
>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>>> that identifies the type of message.
>>> Generalizations
>>> None
>>> Description
>>> MessageKind is an enumeration of the following values:
>>> . complete = sendEvent and receiveEvent are present.
>>> . lost = sendEvent present and receiveEvent absent.
>>> . found = sendEvent absent and receiveEvent present.
>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>
>>>
>>> Therefore the "complete" message kind is correct! I cannot find any
>>> error
>>> in my code, while I'm simply reading the whole model from the xmi like
>>> this:
>>>
>>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.MODEL);
>>>
>>>
>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>> tried
>>> it with simple messages and signals being sent between the lifelines.
>>> The
>>> effect is the same. Has anybody have the same problems with sequence
>>> diagrams?
>>>
>>> I'm using:
>>> Eclipse 3.3.1
>>> EMF 2.3.1
>>> UML2 2.1.1
>>>
>>>
>>>
>>>
>>> Thanks in advance for any suggestions,
>>>
>>> Michael Mlynarski
>>>
>>>
>>
>>
Re: UML2 / Sequence diagram / MessageKind [message #476716 is a reply to message #476708] Fri, 07 December 2007 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hi Kenn,

I use this namespace declaration to read my model. My Enterprise Architect
is generating the xmi file with the following namespace:
xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
read and I'm retrieving an NullPointerException. Using the
http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML models,
but within sequence diagrams I become the IllegalValueException.

Are there any other namespaces I should use? I have used the
eclipse-namespace according to:
http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.


Best regards,
Michael


"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fj92cr$4b0$1@build.eclipse.org...
> Michael,
>
> The format of your mode suggests that it's a UML 2.1(.x) model since it
> contains 'packagedElement' elements... but the namespace declaration
> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>
> Kenn
>
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fj62em$qud$1@build.eclipse.org...
>> Hello there,
>>
>> I've tried to manually delete the 'messageKind="complete"' attribute from
>> the XML file. Unfortunately futher exceptions are being thrown. What am I
>> doing wrong? I've attached my model to this e-mail.
>>
>> The exception being thrown:
>>
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>> at
>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>> Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>> ... 3 more
>> Caused by: java.lang.ArrayStoreException
>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>> ... 20 more
>>
>>
>>
>> Thanks in advance,
>> Michael
>>
>>
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fj44ki$u1k$1@build.eclipse.org...
>>> Michael,
>>>
>>> I suspect you are seeing this error because the property is read-only.
>>> The
>>> UML2 resource implementation doesn't expect to see values for the
>>> Message::messageKind property in a serialization because its value is
>>> derived based on the presence/absence of send/receive events.
>>>
>>> Kenn
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>> Hello there,
>>>>
>>>> I have discovered the following problem: While reading an xmi file
>>>> which
>>>> contains a UML sequence diagram model (created and exported with
>>>> Enteprise
>>>> Architect), the following exception is being thrown:
>>>>
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>> not
>>>> legal. (...)
>>>>
>>>> The xmi file defines the following:
>>>> (...)
>>>> <message xmi:type="uml:Message"
>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>> name="loginCustomer(char)" messageKind="complete"
>>>> messageSort="synchCall"
>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>> (...)
>>>>
>>>> According to the description of the exception, the "messageKind" cannot
>>>> have the value "complete", but according to the UML specification (from
>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>
>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>>>> that identifies the type of message.
>>>> Generalizations
>>>> None
>>>> Description
>>>> MessageKind is an enumeration of the following values:
>>>> . complete = sendEvent and receiveEvent are present.
>>>> . lost = sendEvent present and receiveEvent absent.
>>>> . found = sendEvent absent and receiveEvent present.
>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>
>>>>
>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>> error
>>>> in my code, while I'm simply reading the whole model from the xmi like
>>>> this:
>>>>
>>>> Model _model = (Model)
>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>> UMLPackage.Literals.MODEL);
>>>>
>>>>
>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>> tried
>>>> it with simple messages and signals being sent between the lifelines.
>>>> The
>>>> effect is the same. Has anybody have the same problems with sequence
>>>> diagrams?
>>>>
>>>> I'm using:
>>>> Eclipse 3.3.1
>>>> EMF 2.3.1
>>>> UML2 2.1.1
>>>>
>>>>
>>>>
>>>>
>>>> Thanks in advance for any suggestions,
>>>>
>>>> Michael Mlynarski
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476718 is a reply to message #476716] Sat, 08 December 2007 02:26 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

A file ending with a .xmi extension and containing valid elements from the
'http://schema.omg.org/spec/UML/2.1' namespace should load without problem
in the UML2 editor; the UML2 equivalent of this namespace (for files with a
..uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using this
namespace (with a 2.0.0 instead of 1.0.0) work for you?

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjblnt$1mq$1@build.eclipse.org...
> Hi Kenn,
>
> I use this namespace declaration to read my model. My Enterprise Architect
> is generating the xmi file with the following namespace:
> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
> read and I'm retrieving an NullPointerException. Using the
> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML models,
> but within sequence diagrams I become the IllegalValueException.
>
> Are there any other namespaces I should use? I have used the
> eclipse-namespace according to:
> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>
>
> Best regards,
> Michael
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fj92cr$4b0$1@build.eclipse.org...
>> Michael,
>>
>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>> contains 'packagedElement' elements... but the namespace declaration
>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>
>> Kenn
>>
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fj62em$qud$1@build.eclipse.org...
>>> Hello there,
>>>
>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>> What am I doing wrong? I've attached my model to this e-mail.
>>>
>>> The exception being thrown:
>>>
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>> at
>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>> Source)
>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>> Source)
>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>> ... 3 more
>>> Caused by: java.lang.ArrayStoreException
>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>> ... 20 more
>>>
>>>
>>>
>>> Thanks in advance,
>>> Michael
>>>
>>>
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> I suspect you are seeing this error because the property is read-only.
>>>> The
>>>> UML2 resource implementation doesn't expect to see values for the
>>>> Message::messageKind property in a serialization because its value is
>>>> derived based on the presence/absence of send/receive events.
>>>>
>>>> Kenn
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>> Hello there,
>>>>>
>>>>> I have discovered the following problem: While reading an xmi file
>>>>> which
>>>>> contains a UML sequence diagram model (created and exported with
>>>>> Enteprise
>>>>> Architect), the following exception is being thrown:
>>>>>
>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>> not
>>>>> legal. (...)
>>>>>
>>>>> The xmi file defines the following:
>>>>> (...)
>>>>> <message xmi:type="uml:Message"
>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>> messageSort="synchCall"
>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>> (...)
>>>>>
>>>>> According to the description of the exception, the "messageKind"
>>>>> cannot
>>>>> have the value "complete", but according to the UML specification
>>>>> (from
>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>
>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>> type
>>>>> that identifies the type of message.
>>>>> Generalizations
>>>>> None
>>>>> Description
>>>>> MessageKind is an enumeration of the following values:
>>>>> . complete = sendEvent and receiveEvent are present.
>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>> . found = sendEvent absent and receiveEvent present.
>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>
>>>>>
>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>> error
>>>>> in my code, while I'm simply reading the whole model from the xmi like
>>>>> this:
>>>>>
>>>>> Model _model = (Model)
>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>> UMLPackage.Literals.MODEL);
>>>>>
>>>>>
>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>> tried
>>>>> it with simple messages and signals being sent between the lifelines.
>>>>> The
>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>> diagrams?
>>>>>
>>>>> I'm using:
>>>>> Eclipse 3.3.1
>>>>> EMF 2.3.1
>>>>> UML2 2.1.1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance for any suggestions,
>>>>>
>>>>> Michael Mlynarski
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476720 is a reply to message #476718] Sun, 09 December 2007 15:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello Kenn,

I've found a way to read my UML models! After creating the model in
Enterprise Architect I use the "Export to XMI" function. My XMI Output is
correct according to UML2.1/XMI 2.1 and the files end with *.uml2 suffix.
Then I manually change the namespace from http://schema.omg.org/spec/UML/2.1
to http://www.eclipse.org/uml2/2.1.0/UML.
The next step is to read the *.uml2 file in Eclipse UML2 editor. This action
is opening my model and automatically (!) generating an *.uml file (not
*.uml2!). This file is readable with my code.

For comparison I attach both files (*.uml2 and the *.uml).

My observations:
- the structure of the *.uml differs from the original file
- there are no "messageKind" parameters being used

Why does this happen? Is Enterprise Architect generating incorrect files? Or
does UML2 expect an other kind of xml schema?


Regards,
Michael



"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fjcvda$io2$1@build.eclipse.org...
> Michael,
>
> A file ending with a .xmi extension and containing valid elements from the
> 'http://schema.omg.org/spec/UML/2.1' namespace should load without problem
> in the UML2 editor; the UML2 equivalent of this namespace (for files with
> a
> .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using
> this
> namespace (with a 2.0.0 instead of 1.0.0) work for you?
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjblnt$1mq$1@build.eclipse.org...
>> Hi Kenn,
>>
>> I use this namespace declaration to read my model. My Enterprise
>> Architect
>> is generating the xmi file with the following namespace:
>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>> read and I'm retrieving an NullPointerException. Using the
>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>> models,
>> but within sequence diagrams I become the IllegalValueException.
>>
>> Are there any other namespaces I should use? I have used the
>> eclipse-namespace according to:
>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>
>>
>> Best regards,
>> Michael
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fj92cr$4b0$1@build.eclipse.org...
>>> Michael,
>>>
>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>> contains 'packagedElement' elements... but the namespace declaration
>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
>>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>
>>> Kenn
>>>
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fj62em$qud$1@build.eclipse.org...
>>>> Hello there,
>>>>
>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>
>>>> The exception being thrown:
>>>>
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>> at
>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>> ... 3 more
>>>> Caused by: java.lang.ArrayStoreException
>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>> ... 20 more
>>>>
>>>>
>>>>
>>>> Thanks in advance,
>>>> Michael
>>>>
>>>>
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> I suspect you are seeing this error because the property is read-only.
>>>>> The
>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>> Message::messageKind property in a serialization because its value is
>>>>> derived based on the presence/absence of send/receive events.
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>> Hello there,
>>>>>>
>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>> which
>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>> Enteprise
>>>>>> Architect), the following exception is being thrown:
>>>>>>
>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>> not
>>>>>> legal. (...)
>>>>>>
>>>>>> The xmi file defines the following:
>>>>>> (...)
>>>>>> <message xmi:type="uml:Message"
>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>> messageSort="synchCall"
>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>> (...)
>>>>>>
>>>>>> According to the description of the exception, the "messageKind"
>>>>>> cannot
>>>>>> have the value "complete", but according to the UML specification
>>>>>> (from
>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>
>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>> type
>>>>>> that identifies the type of message.
>>>>>> Generalizations
>>>>>> None
>>>>>> Description
>>>>>> MessageKind is an enumeration of the following values:
>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>
>>>>>>
>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>> error
>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>> like
>>>>>> this:
>>>>>>
>>>>>> Model _model = (Model)
>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>> UMLPackage.Literals.MODEL);
>>>>>>
>>>>>>
>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>> tried
>>>>>> it with simple messages and signals being sent between the lifelines.
>>>>>> The
>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>> diagrams?
>>>>>>
>>>>>> I'm using:
>>>>>> Eclipse 3.3.1
>>>>>> EMF 2.3.1
>>>>>> UML2 2.1.1
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks in advance for any suggestions,
>>>>>>
>>>>>> Michael Mlynarski
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: UML2 / Sequence diagram / MessageKind [message #476721 is a reply to message #476718] Sun, 09 December 2007 17:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello again,

I've found, that the automatic transformation (from *.uml2 to *.uml) isn't
correct. For example each Lifeline in my sequence diagram is represented by
a specific class (is an instance of a specific class). In the original xmi
file (*.uml2) it looks like this:

(...)
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
visibility="public"
represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
</ownedBehavior>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
<type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
<type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
<type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
<type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
<type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
<type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
<type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
</ownedAttribute>
(...)

In the new file, which was generated with the UML2 editor, several
connections to the representant (through "xmi:type") are missing! Here the
relevant part of the *.uml file:

(...)
</ownedBehavior>
<ownedAttribute
xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
</packagedElement>
(...)

Only the first lifeline is connected with a representant (see type="..."
attribute). Is it a possible bug in the automatic conversion from *.uml2 to
*.uml in the UML2 editor?

I've posted my models in my last post (09.12.2007, 16.40 PM).


Thanks in advance,
Michael



"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fjcvda$io2$1@build.eclipse.org...
> Michael,
>
> A file ending with a .xmi extension and containing valid elements from the
> 'http://schema.omg.org/spec/UML/2.1' namespace should load without problem
> in the UML2 editor; the UML2 equivalent of this namespace (for files with
> a .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using
> this namespace (with a 2.0.0 instead of 1.0.0) work for you?
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjblnt$1mq$1@build.eclipse.org...
>> Hi Kenn,
>>
>> I use this namespace declaration to read my model. My Enterprise
>> Architect is generating the xmi file with the following namespace:
>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>> read and I'm retrieving an NullPointerException. Using the
>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>> models, but within sequence diagrams I become the IllegalValueException.
>>
>> Are there any other namespaces I should use? I have used the
>> eclipse-namespace according to:
>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>
>>
>> Best regards,
>> Michael
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fj92cr$4b0$1@build.eclipse.org...
>>> Michael,
>>>
>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>> contains 'packagedElement' elements... but the namespace declaration
>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
>>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>
>>> Kenn
>>>
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fj62em$qud$1@build.eclipse.org...
>>>> Hello there,
>>>>
>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>
>>>> The exception being thrown:
>>>>
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>> at
>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>> ... 3 more
>>>> Caused by: java.lang.ArrayStoreException
>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>> ... 20 more
>>>>
>>>>
>>>>
>>>> Thanks in advance,
>>>> Michael
>>>>
>>>>
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> I suspect you are seeing this error because the property is read-only.
>>>>> The
>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>> Message::messageKind property in a serialization because its value is
>>>>> derived based on the presence/absence of send/receive events.
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>> Hello there,
>>>>>>
>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>> which
>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>> Enteprise
>>>>>> Architect), the following exception is being thrown:
>>>>>>
>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>> not
>>>>>> legal. (...)
>>>>>>
>>>>>> The xmi file defines the following:
>>>>>> (...)
>>>>>> <message xmi:type="uml:Message"
>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>> messageSort="synchCall"
>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>> (...)
>>>>>>
>>>>>> According to the description of the exception, the "messageKind"
>>>>>> cannot
>>>>>> have the value "complete", but according to the UML specification
>>>>>> (from
>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>
>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>> type
>>>>>> that identifies the type of message.
>>>>>> Generalizations
>>>>>> None
>>>>>> Description
>>>>>> MessageKind is an enumeration of the following values:
>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>
>>>>>>
>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>> error
>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>> like
>>>>>> this:
>>>>>>
>>>>>> Model _model = (Model)
>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>> UMLPackage.Literals.MODEL);
>>>>>>
>>>>>>
>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>> tried
>>>>>> it with simple messages and signals being sent between the lifelines.
>>>>>> The
>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>> diagrams?
>>>>>>
>>>>>> I'm using:
>>>>>> Eclipse 3.3.1
>>>>>> EMF 2.3.1
>>>>>> UML2 2.1.1
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks in advance for any suggestions,
>>>>>>
>>>>>> Michael Mlynarski
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476724 is a reply to message #476720] Mon, 10 December 2007 15:12 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

If the files that are exported are indeed compliant with UML 2.1, you
shouldn't need to change the namespace - just change the file extension to
'.xmi'.

The UML2 editor automatically migrates models based on the older (UML2 1.x)
format, with a file extension of '.uml2', to the latest format (UML2 2.x),
with a file extension of '.uml'. The structure of the .uml files will differ
from the structure of the (original) .uml2 files because they are being
saved using the UML2 resource implementation; values for the
Message::messageKind property are not saved because, as as stated
previously, this property is read-only and derived (caculated) based on the
values of other properties and hence needs not have its values persisted.

The tool you are using should not be generating files with a .uml2 extension
if the content it is generating is based on UML 2.1 (UML2 2.x). It should
also probably not be serializing values for the 'messageKind' property...

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjh2a2$67s$1@build.eclipse.org...
> Hello Kenn,
>
> I've found a way to read my UML models! After creating the model in
> Enterprise Architect I use the "Export to XMI" function. My XMI Output is
> correct according to UML2.1/XMI 2.1 and the files end with *.uml2 suffix.
> Then I manually change the namespace from
> http://schema.omg.org/spec/UML/2.1 to
> http://www.eclipse.org/uml2/2.1.0/UML.
> The next step is to read the *.uml2 file in Eclipse UML2 editor. This
> action is opening my model and automatically (!) generating an *.uml file
> (not *.uml2!). This file is readable with my code.
>
> For comparison I attach both files (*.uml2 and the *.uml).
>
> My observations:
> - the structure of the *.uml differs from the original file
> - there are no "messageKind" parameters being used
>
> Why does this happen? Is Enterprise Architect generating incorrect files?
> Or does UML2 expect an other kind of xml schema?
>
>
> Regards,
> Michael
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fjcvda$io2$1@build.eclipse.org...
>> Michael,
>>
>> A file ending with a .xmi extension and containing valid elements from
>> the
>> 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>> problem
>> in the UML2 editor; the UML2 equivalent of this namespace (for files with
>> a
>> .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using
>> this
>> namespace (with a 2.0.0 instead of 1.0.0) work for you?
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fjblnt$1mq$1@build.eclipse.org...
>>> Hi Kenn,
>>>
>>> I use this namespace declaration to read my model. My Enterprise
>>> Architect
>>> is generating the xmi file with the following namespace:
>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>>> read and I'm retrieving an NullPointerException. Using the
>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>> models,
>>> but within sequence diagrams I become the IllegalValueException.
>>>
>>> Are there any other namespaces I should use? I have used the
>>> eclipse-namespace according to:
>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>>
>>>
>>> Best regards,
>>> Michael
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>>> contains 'packagedElement' elements... but the namespace declaration
>>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version
>>>> of
>>>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>>>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>>
>>>> Kenn
>>>>
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>> Hello there,
>>>>>
>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>
>>>>> The exception being thrown:
>>>>>
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>> at
>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>> Source)
>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>> ... 3 more
>>>>> Caused by: java.lang.ArrayStoreException
>>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>> ... 20 more
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Michael
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>> Michael,
>>>>>>
>>>>>> I suspect you are seeing this error because the property is
>>>>>> read-only.
>>>>>> The
>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>> Message::messageKind property in a serialization because its value is
>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>> Hello there,
>>>>>>>
>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>> which
>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>> Enteprise
>>>>>>> Architect), the following exception is being thrown:
>>>>>>>
>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>>> not
>>>>>>> legal. (...)
>>>>>>>
>>>>>>> The xmi file defines the following:
>>>>>>> (...)
>>>>>>> <message xmi:type="uml:Message"
>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>> messageSort="synchCall"
>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>> (...)
>>>>>>>
>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>> cannot
>>>>>>> have the value "complete", but according to the UML specification
>>>>>>> (from
>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>
>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>> type
>>>>>>> that identifies the type of message.
>>>>>>> Generalizations
>>>>>>> None
>>>>>>> Description
>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>
>>>>>>>
>>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>>> error
>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>> like
>>>>>>> this:
>>>>>>>
>>>>>>> Model _model = (Model)
>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>
>>>>>>>
>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>>> tried
>>>>>>> it with simple messages and signals being sent between the
>>>>>>> lifelines.
>>>>>>> The
>>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>>> diagrams?
>>>>>>>
>>>>>>> I'm using:
>>>>>>> Eclipse 3.3.1
>>>>>>> EMF 2.3.1
>>>>>>> UML2 2.1.1
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks in advance for any suggestions,
>>>>>>>
>>>>>>> Michael Mlynarski
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476725 is a reply to message #476721] Mon, 10 December 2007 15:24 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

An instance specification cannot be used as the type of a property in UML -
InstanceSpecification is not a specialization of Type... I suspect these
references are being discarded because they are invalid (when I tried
opening the model, a number of errors appeared on the 'Problems' tab of the
UML editor). I think the bug is in the tool that you are using to produce
the original UML model...

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjh74b$udl$1@build.eclipse.org...
> Hello again,
>
> I've found, that the automatic transformation (from *.uml2 to *.uml) isn't
> correct. For example each Lifeline in my sequence diagram is represented
> by a specific class (is an instance of a specific class). In the original
> xmi file (*.uml2) it looks like this:
>
> (...)
> <lifeline xmi:type="uml:Lifeline"
> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
> visibility="public"
> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
> </ownedBehavior>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
> </ownedAttribute>
> (...)
>
> In the new file, which was generated with the UML2 editor, several
> connections to the representant (through "xmi:type") are missing! Here the
> relevant part of the *.uml file:
>
> (...)
> </ownedBehavior>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
> </packagedElement>
> (...)
>
> Only the first lifeline is connected with a representant (see type="..."
> attribute). Is it a possible bug in the automatic conversion from *.uml2
> to *.uml in the UML2 editor?
>
> I've posted my models in my last post (09.12.2007, 16.40 PM).
>
>
> Thanks in advance,
> Michael
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fjcvda$io2$1@build.eclipse.org...
>> Michael,
>>
>> A file ending with a .xmi extension and containing valid elements from
>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>> files with a .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'.
>> Does using this namespace (with a 2.0.0 instead of 1.0.0) work for you?
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fjblnt$1mq$1@build.eclipse.org...
>>> Hi Kenn,
>>>
>>> I use this namespace declaration to read my model. My Enterprise
>>> Architect is generating the xmi file with the following namespace:
>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>>> read and I'm retrieving an NullPointerException. Using the
>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>> models, but within sequence diagrams I become the IllegalValueException.
>>>
>>> Are there any other namespaces I should use? I have used the
>>> eclipse-namespace according to:
>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>>
>>>
>>> Best regards,
>>> Michael
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>>> contains 'packagedElement' elements... but the namespace declaration
>>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version
>>>> of UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property
>>>> of the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>>
>>>> Kenn
>>>>
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>> Hello there,
>>>>>
>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>
>>>>> The exception being thrown:
>>>>>
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>> at
>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>> Source)
>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>> ... 3 more
>>>>> Caused by: java.lang.ArrayStoreException
>>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>> ... 20 more
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Michael
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>> Michael,
>>>>>>
>>>>>> I suspect you are seeing this error because the property is
>>>>>> read-only. The
>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>> Message::messageKind property in a serialization because its value is
>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>> Hello there,
>>>>>>>
>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>> which
>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>> Enteprise
>>>>>>> Architect), the following exception is being thrown:
>>>>>>>
>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>>> not
>>>>>>> legal. (...)
>>>>>>>
>>>>>>> The xmi file defines the following:
>>>>>>> (...)
>>>>>>> <message xmi:type="uml:Message"
>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>> messageSort="synchCall"
>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>> (...)
>>>>>>>
>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>> cannot
>>>>>>> have the value "complete", but according to the UML specification
>>>>>>> (from
>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>
>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>> type
>>>>>>> that identifies the type of message.
>>>>>>> Generalizations
>>>>>>> None
>>>>>>> Description
>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>
>>>>>>>
>>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>>> error
>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>> like
>>>>>>> this:
>>>>>>>
>>>>>>> Model _model = (Model)
>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>
>>>>>>>
>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>>> tried
>>>>>>> it with simple messages and signals being sent between the
>>>>>>> lifelines. The
>>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>>> diagrams?
>>>>>>>
>>>>>>> I'm using:
>>>>>>> Eclipse 3.3.1
>>>>>>> EMF 2.3.1
>>>>>>> UML2 2.1.1
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks in advance for any suggestions,
>>>>>>>
>>>>>>> Michael Mlynarski
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476738 is a reply to message #476725] Wed, 12 December 2007 01:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Kenn,

thanks for your advices. As I have to implement my small application for
analysing heterogenous uml models fast, I have modelled the sequence diagram
in the UML2 editor. For now it works fine.

I think it's a little bit strange, that the Enterprise Architect (being
recommended directly from OMG) is generating incorrect xmi output. The
interchange between different uml modeling tools with xmi files seems to be
really complicated.


Regards,
Michael


"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fjjlno$hpg$1@build.eclipse.org...
> Michael,
>
> An instance specification cannot be used as the type of a property in
> UML - InstanceSpecification is not a specialization of Type... I suspect
> these references are being discarded because they are invalid (when I
> tried opening the model, a number of errors appeared on the 'Problems' tab
> of the UML editor). I think the bug is in the tool that you are using to
> produce the original UML model...
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjh74b$udl$1@build.eclipse.org...
>> Hello again,
>>
>> I've found, that the automatic transformation (from *.uml2 to *.uml)
>> isn't correct. For example each Lifeline in my sequence diagram is
>> represented by a specific class (is an instance of a specific class). In
>> the original xmi file (*.uml2) it looks like this:
>>
>> (...)
>> <lifeline xmi:type="uml:Lifeline"
>> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
>> visibility="public"
>> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
>> </ownedBehavior>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
>> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
>> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
>> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
>> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
>> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
>> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
>> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
>> </ownedAttribute>
>> (...)
>>
>> In the new file, which was generated with the UML2 editor, several
>> connections to the representant (through "xmi:type") are missing! Here
>> the relevant part of the *.uml file:
>>
>> (...)
>> </ownedBehavior>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
>> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
>> </packagedElement>
>> (...)
>>
>> Only the first lifeline is connected with a representant (see type="..."
>> attribute). Is it a possible bug in the automatic conversion from *.uml2
>> to *.uml in the UML2 editor?
>>
>> I've posted my models in my last post (09.12.2007, 16.40 PM).
>>
>>
>> Thanks in advance,
>> Michael
>>
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fjcvda$io2$1@build.eclipse.org...
>>> Michael,
>>>
>>> A file ending with a .xmi extension and containing valid elements from
>>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>>> files with a .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'.
>>> Does using this namespace (with a 2.0.0 instead of 1.0.0) work for you?
>>>
>>> Kenn
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fjblnt$1mq$1@build.eclipse.org...
>>>> Hi Kenn,
>>>>
>>>> I use this namespace declaration to read my model. My Enterprise
>>>> Architect is generating the xmi file with the following namespace:
>>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot
>>>> be read and I'm retrieving an NullPointerException. Using the
>>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>>> models, but within sequence diagrams I become the
>>>> IllegalValueException.
>>>>
>>>> Are there any other namespaces I should use? I have used the
>>>> eclipse-namespace according to:
>>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>>>
>>>>
>>>> Best regards,
>>>> Michael
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> The format of your mode suggests that it's a UML 2.1(.x) model since
>>>>> it contains 'packagedElement' elements... but the namespace
>>>>> declaration (http://www.eclipse.org/uml2/1.0.0/UML") references the
>>>>> older version of UML2 which was (nearly) based on UML 2.0. The
>>>>> 'ownedMember' property of the Package metaclass was renamed to
>>>>> 'packagedElement' in UML 2.1...
>>>>>
>>>>> Kenn
>>>>>
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>>> Hello there,
>>>>>>
>>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>>
>>>>>> The exception being thrown:
>>>>>>
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>> at
>>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>>> Source)
>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>> ... 3 more
>>>>>> Caused by: java.lang.ArrayStoreException
>>>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>>> at
>>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>>> at
>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>>> at
>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>>> ... 20 more
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Michael
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>>> Michael,
>>>>>>>
>>>>>>> I suspect you are seeing this error because the property is
>>>>>>> read-only. The
>>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>>> Message::messageKind property in a serialization because its value
>>>>>>> is
>>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>>> Hello there,
>>>>>>>>
>>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>>> which
>>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>>> Enteprise
>>>>>>>> Architect), the following exception is being thrown:
>>>>>>>>
>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
>>>>>>>> is not
>>>>>>>> legal. (...)
>>>>>>>>
>>>>>>>> The xmi file defines the following:
>>>>>>>> (...)
>>>>>>>> <message xmi:type="uml:Message"
>>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>>> messageSort="synchCall"
>>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>>> (...)
>>>>>>>>
>>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>>> cannot
>>>>>>>> have the value "complete", but according to the UML specification
>>>>>>>> (from
>>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>>
>>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>>> type
>>>>>>>> that identifies the type of message.
>>>>>>>> Generalizations
>>>>>>>> None
>>>>>>>> Description
>>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>>
>>>>>>>>
>>>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>>>> error
>>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>>> like
>>>>>>>> this:
>>>>>>>>
>>>>>>>> Model _model = (Model)
>>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>>
>>>>>>>>
>>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I
>>>>>>>> have tried
>>>>>>>> it with simple messages and signals being sent between the
>>>>>>>> lifelines. The
>>>>>>>> effect is the same. Has anybody have the same problems with
>>>>>>>> sequence
>>>>>>>> diagrams?
>>>>>>>>
>>>>>>>> I'm using:
>>>>>>>> Eclipse 3.3.1
>>>>>>>> EMF 2.3.1
>>>>>>>> UML2 2.1.1
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks in advance for any suggestions,
>>>>>>>>
>>>>>>>> Michael Mlynarski
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476748 is a reply to message #476738] Wed, 12 December 2007 18:56 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

The problem is that the XMI specification (like most) leaves room for
interpretation in certain areas... Note, however, that serialization of
derived properties is explicitly discouraged by the (latest) XMI
specification...

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjneri$3md$1@build.eclipse.org...
> Kenn,
>
> thanks for your advices. As I have to implement my small application for
> analysing heterogenous uml models fast, I have modelled the sequence
> diagram in the UML2 editor. For now it works fine.
>
> I think it's a little bit strange, that the Enterprise Architect (being
> recommended directly from OMG) is generating incorrect xmi output. The
> interchange between different uml modeling tools with xmi files seems to
> be really complicated.
>
>
> Regards,
> Michael
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fjjlno$hpg$1@build.eclipse.org...
>> Michael,
>>
>> An instance specification cannot be used as the type of a property in
>> UML - InstanceSpecification is not a specialization of Type... I suspect
>> these references are being discarded because they are invalid (when I
>> tried opening the model, a number of errors appeared on the 'Problems'
>> tab of the UML editor). I think the bug is in the tool that you are using
>> to produce the original UML model...
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fjh74b$udl$1@build.eclipse.org...
>>> Hello again,
>>>
>>> I've found, that the automatic transformation (from *.uml2 to *.uml)
>>> isn't correct. For example each Lifeline in my sequence diagram is
>>> represented by a specific class (is an instance of a specific class). In
>>> the original xmi file (*.uml2) it looks like this:
>>>
>>> (...)
>>> <lifeline xmi:type="uml:Lifeline"
>>> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
>>> visibility="public"
>>> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
>>> </ownedBehavior>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
>>> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
>>> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
>>> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
>>> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
>>> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
>>> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
>>> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
>>> </ownedAttribute>
>>> (...)
>>>
>>> In the new file, which was generated with the UML2 editor, several
>>> connections to the representant (through "xmi:type") are missing! Here
>>> the relevant part of the *.uml file:
>>>
>>> (...)
>>> </ownedBehavior>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
>>> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
>>> </packagedElement>
>>> (...)
>>>
>>> Only the first lifeline is connected with a representant (see type="..."
>>> attribute). Is it a possible bug in the automatic conversion from *.uml2
>>> to *.uml in the UML2 editor?
>>>
>>> I've posted my models in my last post (09.12.2007, 16.40 PM).
>>>
>>>
>>> Thanks in advance,
>>> Michael
>>>
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fjcvda$io2$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> A file ending with a .xmi extension and containing valid elements from
>>>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>>>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>>>> files with a .uml extension) is
>>>> 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using this namespace
>>>> (with a 2.0.0 instead of 1.0.0) work for you?
>>>>
>>>> Kenn
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:fjblnt$1mq$1@build.eclipse.org...
>>>>> Hi Kenn,
>>>>>
>>>>> I use this namespace declaration to read my model. My Enterprise
>>>>> Architect is generating the xmi file with the following namespace:
>>>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot
>>>>> be read and I'm retrieving an NullPointerException. Using the
>>>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>>>> models, but within sequence diagrams I become the
>>>>> IllegalValueException.
>>>>>
>>>>> Are there any other namespaces I should use? I have used the
>>>>> eclipse-namespace according to:
>>>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Michael
>>>>>
>>>>>
>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>>>> Michael,
>>>>>>
>>>>>> The format of your mode suggests that it's a UML 2.1(.x) model since
>>>>>> it contains 'packagedElement' elements... but the namespace
>>>>>> declaration (http://www.eclipse.org/uml2/1.0.0/UML") references the
>>>>>> older version of UML2 which was (nearly) based on UML 2.0. The
>>>>>> 'ownedMember' property of the Package metaclass was renamed to
>>>>>> 'packagedElement' in UML 2.1...
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>>
>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>>>> Hello there,
>>>>>>>
>>>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>>>
>>>>>>> The exception being thrown:
>>>>>>>
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>> at
>>>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>>>> Source)
>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>> ... 3 more
>>>>>>> Caused by: java.lang.ArrayStoreException
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>>>> at
>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>>>> at
>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>>>> ... 20 more
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Michael
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>>>> Michael,
>>>>>>>>
>>>>>>>> I suspect you are seeing this error because the property is
>>>>>>>> read-only. The
>>>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>>>> Message::messageKind property in a serialization because its value
>>>>>>>> is
>>>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>>>
>>>>>>>> Kenn
>>>>>>>>
>>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>>>> Hello there,
>>>>>>>>>
>>>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>>>> which
>>>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>>>> Enteprise
>>>>>>>>> Architect), the following exception is being thrown:
>>>>>>>>>
>>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
>>>>>>>>> is not
>>>>>>>>> legal. (...)
>>>>>>>>>
>>>>>>>>> The xmi file defines the following:
>>>>>>>>> (...)
>>>>>>>>> <message xmi:type="uml:Message"
>>>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>>>> messageSort="synchCall"
>>>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>>>> (...)
>>>>>>>>>
>>>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>>>> cannot
>>>>>>>>> have the value "complete", but according to the UML specification
>>>>>>>>> (from
>>>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>>>
>>>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>>>> type
>>>>>>>>> that identifies the type of message.
>>>>>>>>> Generalizations
>>>>>>>>> None
>>>>>>>>> Description
>>>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Therefore the "complete" message kind is correct! I cannot find
>>>>>>>>> any error
>>>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>>>> like
>>>>>>>>> this:
>>>>>>>>>
>>>>>>>>> Model _model = (Model)
>>>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I
>>>>>>>>> have tried
>>>>>>>>> it with simple messages and signals being sent between the
>>>>>>>>> lifelines. The
>>>>>>>>> effect is the same. Has anybody have the same problems with
>>>>>>>>> sequence
>>>>>>>>> diagrams?
>>>>>>>>>
>>>>>>>>> I'm using:
>>>>>>>>> Eclipse 3.3.1
>>>>>>>>> EMF 2.3.1
>>>>>>>>> UML2 2.1.1
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks in advance for any suggestions,
>>>>>>>>>
>>>>>>>>> Michael Mlynarski
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #476786 is a reply to message #476748] Wed, 19 December 2007 07:42 Go to previous message
Reinhard Jeschull is currently offline Reinhard JeschullFriend
Messages: 10
Registered: July 2009
Junior Member
I am using Enterprise Architect with EMF/UML2 too. A lot of informations
are missing in the XMI file, that is exported by EA. For example:
- Message arguments in sequence diagrams (like msg("Test", 138) )
- Covered-Attributes sometimes refer to an Class/Object/... instead of
the lifeline
- Derived attributes are included
- Wrong metamodell-classes are used (uml:Action instead of
uml:OpaqueAction, ...)
- Incorrect prefixes for some attribut values (like 'pk_out' instead of
'out')
- violate the uml metamodell (wrong structure, ...)
- ... very much more

I was very angry about that awful XMI exporter. But now, I have written
my own EAXMIConverter, that converts all the errors. I have fixed about
30 bugs in about the half of the diagram types and the elements we are
using for our models (we don't need composition associations for our
models, for example).

You can take a look at my thread with SOME bugs (not all):
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=sugge stions;action=display;num=1190806010

Kenn Hussey schrieb:
> Michael,
>
> The problem is that the XMI specification (like most) leaves room for
> interpretation in certain areas... Note, however, that serialization of
> derived properties is explicitly discouraged by the (latest) XMI
> specification...
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjneri$3md$1@build.eclipse.org...
>> Kenn,
>>
>> thanks for your advices. As I have to implement my small application for
>> analysing heterogenous uml models fast, I have modelled the sequence
>> diagram in the UML2 editor. For now it works fine.
>>
>> I think it's a little bit strange, that the Enterprise Architect (being
>> recommended directly from OMG) is generating incorrect xmi output. The
>> interchange between different uml modeling tools with xmi files seems to
>> be really complicated.
>>
>>
>> Regards,
>> Michael
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fjjlno$hpg$1@build.eclipse.org...
>>> Michael,
>>>
>>> An instance specification cannot be used as the type of a property in
>>> UML - InstanceSpecification is not a specialization of Type... I suspect
>>> these references are being discarded because they are invalid (when I
>>> tried opening the model, a number of errors appeared on the 'Problems'
>>> tab of the UML editor). I think the bug is in the tool that you are using
>>> to produce the original UML model...
>>>
>>> Kenn
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fjh74b$udl$1@build.eclipse.org...
>>>> Hello again,
>>>>
>>>> I've found, that the automatic transformation (from *.uml2 to *.uml)
>>>> isn't correct. For example each Lifeline in my sequence diagram is
>>>> represented by a specific class (is an instance of a specific class). In
>>>> the original xmi file (*.uml2) it looks like this:
>>>>
>>>> (...)
>>>> <lifeline xmi:type="uml:Lifeline"
>>>> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
>>>> visibility="public"
>>>> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
>>>> </ownedBehavior>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
>>>> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
>>>> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
>>>> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
>>>> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
>>>> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
>>>> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
>>>> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
>>>> </ownedAttribute>
>>>> (...)
>>>>
>>>> In the new file, which was generated with the UML2 editor, several
>>>> connections to the representant (through "xmi:type") are missing! Here
>>>> the relevant part of the *.uml file:
>>>>
>>>> (...)
>>>> </ownedBehavior>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
>>>> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
>>>> </packagedElement>
>>>> (...)
>>>>
>>>> Only the first lifeline is connected with a representant (see type="..."
>>>> attribute). Is it a possible bug in the automatic conversion from *.uml2
>>>> to *.uml in the UML2 editor?
>>>>
>>>> I've posted my models in my last post (09.12.2007, 16.40 PM).
>>>>
>>>>
>>>> Thanks in advance,
>>>> Michael
>>>>
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fjcvda$io2$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> A file ending with a .xmi extension and containing valid elements from
>>>>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>>>>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>>>>> files with a .uml extension) is
>>>>> 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using this namespace
>>>>> (with a 2.0.0 instead of 1.0.0) work for you?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:fjblnt$1mq$1@build.eclipse.org...
>>>>>> Hi Kenn,
>>>>>>
>>>>>> I use this namespace declaration to read my model. My Enterprise
>>>>>> Architect is generating the xmi file with the following namespace:
>>>>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot
>>>>>> be read and I'm retrieving an NullPointerException. Using the
>>>>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>>>>> models, but within sequence diagrams I become the
>>>>>> IllegalValueException.
>>>>>>
>>>>>> Are there any other namespaces I should use? I have used the
>>>>>> eclipse-namespace according to:
>>>>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/.
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>> Michael
>>>>>>
>>>>>>
>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>>>>> Michael,
>>>>>>>
>>>>>>> The format of your mode suggests that it's a UML 2.1(.x) model since
>>>>>>> it contains 'packagedElement' elements... but the namespace
>>>>>>> declaration (http://www.eclipse.org/uml2/1.0.0/UML") references the
>>>>>>> older version of UML2 which was (nearly) based on UML 2.0. The
>>>>>>> 'ownedMember' property of the Package metaclass was renamed to
>>>>>>> 'packagedElement' in UML 2.1...
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>>
>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>>>>> Hello there,
>>>>>>>>
>>>>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>>>>
>>>>>>>> The exception being thrown:
>>>>>>>>
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>>> at
>>>>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>>> ... 3 more
>>>>>>>> Caused by: java.lang.ArrayStoreException
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>>>>> ... 20 more
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks in advance,
>>>>>>>> Michael
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>>>>> Michael,
>>>>>>>>>
>>>>>>>>> I suspect you are seeing this error because the property is
>>>>>>>>> read-only. The
>>>>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>>>>> Message::messageKind property in a serialization because its value
>>>>>>>>> is
>>>>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>>>>
>>>>>>>>> Kenn
>>>>>>>>>
>>>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>>>>> Hello there,
>>>>>>>>>>
>>>>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>>>>> which
>>>>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>>>>> Enteprise
>>>>>>>>>> Architect), the following exception is being thrown:
>>>>>>>>>>
>>>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
>>>>>>>>>> is not
>>>>>>>>>> legal. (...)
>>>>>>>>>>
>>>>>>>>>> The xmi file defines the following:
>>>>>>>>>> (...)
>>>>>>>>>> <message xmi:type="uml:Message"
>>>>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>>>>> messageSort="synchCall"
>>>>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>>>>> (...)
>>>>>>>>>>
>>>>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>>>>> cannot
>>>>>>>>>> have the value "complete", but according to the UML specification
>>>>>>>>>> (from
>>>>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>>>>
>>>>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>>>>> type
>>>>>>>>>> that identifies the type of message.
>>>>>>>>>> Generalizations
>>>>>>>>>> None
>>>>>>>>>> Description
>>>>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Therefore the "complete" message kind is correct! I cannot find
>>>>>>>>>> any error
>>>>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>>>>> like
>>>>>>>>>> this:
>>>>>>>>>>
>>>>>>>>>> Model _model = (Model)
>>>>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I
>>>>>>>>>> have tried
>>>>>>>>>> it with simple messages and signals being sent between the
>>>>>>>>>> lifelines. The
>>>>>>>>>> effect is the same. Has anybody have the same problems with
>>>>>>>>>> sequence
>>>>>>>>>> diagrams?
>>>>>>>>>>
>>>>>>>>>> I'm using:
>>>>>>>>>> Eclipse 3.3.1
>>>>>>>>>> EMF 2.3.1
>>>>>>>>>> UML2 2.1.1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks in advance for any suggestions,
>>>>>>>>>>
>>>>>>>>>> Michael Mlynarski
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625665 is a reply to message #476692] Mon, 03 December 2007 11:13 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Michael,

In my experience, usually the IllegalValueException is caused by some
other exception, because this is just a Resource.Diagnostic indicating
that the something went wrong in setting an EStructuralFeature value. One
problem I've seen before is that an attribute of type String could not be
set because I had a bad UML2 build (or mismatch between EMF and UML2
versions), in which the uml::String EDataType thought its classifier ID
was 2 but the UMLPackage thought it should be 265 or some such. The
result was that the UMLFactory::createFromString(EDataType, String) method
could not deserialize string values.

Can you post the whole stack trace, including any "Caused by:" exceptions?

Thanks,

Christian

Michael Mlynarski wrote:

> Hello there,

> I have discovered the following problem: While reading an xmi file which
> contains a UML sequence diagram model (created and exported with Enteprise
> Architect), the following exception is being thrown:

> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
> legal. (...)

-----8<-----

> Thanks in advance for any suggestions,

> Michael Mlynarski
Re: UML2 / Sequence diagram / MessageKind [message #625666 is a reply to message #476694] Mon, 03 December 2007 20:42 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello Christian,

thanks for your tipp. Unfortunately the are no further exceptions being
thrown. The stack trace looks like this:

org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
java.lang.NullPointerException
at de.mlynarski.utils.LoadUML.load(LoadUML.java:53)
at de.mlynarski.utils.LoadUML.main(LoadUML.java:76)

I have tried to debug my application. There is no "detailMessage" in the
exception. The main cause is an NullPointerException.

The sequence diagram isn't very complex. Regrettably the same error occurs,
when I try to load a communication diagram (which is very similar to the
sequence diagram). I don't have a clue if it is a problem in the model
itself (xmi file) or the uml2 api.


Greetings,
Michael



"Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
news:8d2f6de5b356efc7761f07c737830ae2$1@www.eclipse.org...
> Hi, Michael,
>
> In my experience, usually the IllegalValueException is caused by some
> other exception, because this is just a Resource.Diagnostic indicating
> that the something went wrong in setting an EStructuralFeature value. One
> problem I've seen before is that an attribute of type String could not be
> set because I had a bad UML2 build (or mismatch between EMF and UML2
> versions), in which the uml::String EDataType thought its classifier ID
> was 2 but the UMLPackage thought it should be 265 or some such. The
> result was that the UMLFactory::createFromString(EDataType, String) method
> could not deserialize string values.
>
> Can you post the whole stack trace, including any "Caused by:" exceptions?
>
> Thanks,
>
> Christian
>
> Michael Mlynarski wrote:
>
>> Hello there,
>
>> I have discovered the following problem: While reading an xmi file which
>> contains a UML sequence diagram model (created and exported with
>> Enteprise Architect), the following exception is being thrown:
>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (...)
>
> -----8<-----
>
>> Thanks in advance for any suggestions,
>
>> Michael Mlynarski
>
Re: UML2 / Sequence diagram / MessageKind [message #625667 is a reply to message #476695] Tue, 04 December 2007 14:50 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Michael,

Would it be possible to post a section of your model that is causing the
problem? Or if you have steps on recreating the model to reproduce the
error?

- James.


"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fj1pnq$sc4$1@build.eclipse.org...
> Hello Christian,
>
> thanks for your tipp. Unfortunately the are no further exceptions being
> thrown. The stack trace looks like this:
>
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
> legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
> java.lang.NullPointerException
> at de.mlynarski.utils.LoadUML.load(LoadUML.java:53)
> at de.mlynarski.utils.LoadUML.main(LoadUML.java:76)
>
> I have tried to debug my application. There is no "detailMessage" in the
> exception. The main cause is an NullPointerException.
>
> The sequence diagram isn't very complex. Regrettably the same error
> occurs, when I try to load a communication diagram (which is very similar
> to the sequence diagram). I don't have a clue if it is a problem in the
> model itself (xmi file) or the uml2 api.
>
>
> Greetings,
> Michael
>
>
>
> "Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
> news:8d2f6de5b356efc7761f07c737830ae2$1@www.eclipse.org...
>> Hi, Michael,
>>
>> In my experience, usually the IllegalValueException is caused by some
>> other exception, because this is just a Resource.Diagnostic indicating
>> that the something went wrong in setting an EStructuralFeature value.
>> One problem I've seen before is that an attribute of type String could
>> not be set because I had a bad UML2 build (or mismatch between EMF and
>> UML2 versions), in which the uml::String EDataType thought its classifier
>> ID was 2 but the UMLPackage thought it should be 265 or some such. The
>> result was that the UMLFactory::createFromString(EDataType, String)
>> method could not deserialize string values.
>>
>> Can you post the whole stack trace, including any "Caused by:"
>> exceptions?
>>
>> Thanks,
>>
>> Christian
>>
>> Michael Mlynarski wrote:
>>
>>> Hello there,
>>
>>> I have discovered the following problem: While reading an xmi file which
>>> contains a UML sequence diagram model (created and exported with
>>> Enteprise Architect), the following exception is being thrown:
>>
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>>> legal. (...)
>>
>> -----8<-----
>>
>>> Thanks in advance for any suggestions,
>>
>>> Michael Mlynarski
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625668 is a reply to message #476692] Tue, 04 December 2007 18:00 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

I suspect you are seeing this error because the property is read-only. The
UML2 resource implementation doesn't expect to see values for the
Message::messageKind property in a serialization because its value is
derived based on the presence/absence of send/receive events.

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
> Hello there,
>
> I have discovered the following problem: While reading an xmi file which
> contains a UML sequence diagram model (created and exported with Enteprise
> Architect), the following exception is being thrown:
>
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
> legal. (...)
>
> The xmi file defines the following:
> (...)
> <message xmi:type="uml:Message"
> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
> name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
> (...)
>
> According to the description of the exception, the "messageKind" cannot
> have the value "complete", but according to the UML specification (from
> http://www.omg.org/docs/formal/07-02-03.pdf):
>
> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
> that identifies the type of message.
> Generalizations
> None
> Description
> MessageKind is an enumeration of the following values:
>
Re: UML2 / Sequence diagram / MessageKind [message #625671 is a reply to message #476696] Tue, 04 December 2007 22:02 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello James,

my model looks like this:

<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmi:version="2.1" xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
<uml:Model xmi:type="uml:Model" name="EA_Model" visibility="public">
<packagedElement xmi:type="uml:Package"
xmi:id="EAPK_EB4DBC17_1A70_448e_99EA_E895862CB6FD" name="System Model 1"
visibility="public">
<packagedElement xmi:type="uml:Collaboration"
xmi:id="EAID_CB000000_C17_1A70_448e_99EA_E895862CB6F"
name="EA_Collaboration1" visibility="public">
<ownedBehavior xmi:type="uml:Interaction"
xmi:id="EAID_IN000000_C17_1A70_448e_99EA_E895862CB6F" name="EA_Interaction1"
visibility="public">
<fragment xmi:type="uml:OccurrenceSpecification"
xmi:id="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
covered="EAID_LL000000_E475_4fdd_A45B_0AC888D8AD60"/>
<fragment xmi:type="uml:OccurrenceSpecification"
xmi:id="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
covered="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
<message xmi:type="uml:Message"
xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_E475_4fdd_A45B_0AC888D8AD60" name="Customer"
visibility="public"
represents="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_10FB_4692_A8AD_1D7E967829D3" name="cart"
visibility="public"
represents="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_C1DE_4bc7_AEAD_CAA654072E62" name="cartItem"
visibility="public"
represents="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_914B_413a_8366_C725EE082E00" name="product"
visibility="public"
represents="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/ >
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
visibility="public"
represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
</ownedBehavior>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
<type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
<type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
<type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
<type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
<type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Actor"
xmi:id="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60" name="Customer"
visibility="public"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3" name="cart"
visibility="public" classifier="EAID_B1DDA8F9_85B5_41d5_8F8A_0C0243351763"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62" name="cartItem"
visibility="public" classifier="EAID_1ACE73ED_22D5_442d_AF33_F79C3F3E6A45"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_A8D37607_914B_413a_8366_C725EE082E00" name="product"
visibility="public" classifier="EAID_C2DE150C_FC45_4cd6_B82C_8C5769DC27B9"/>
<packagedElement xmi:type="uml:InstanceSpecification"
xmi:id="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653" name="shop"
visibility="public" classifier="EAID_2D4B9681_6BA6_4b39_AF79_739217DA58D0"/>
</packagedElement>
</uml:Model>
</xmi:XMI>



Each message has an attribute messageKind with the value "complete". This is
causing the "value is not legal" error.
I've extended my model with more messages and more lifelines. The exception
being thrown now is larger:


org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
at de.mlynarski.utils.LoadUML.main(LoadUML.java:73)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
is not legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2578)
at
org.eclipse.uml2.uml.internal.resource.UMLHandler.handleObje ctAttribs(UMLHandler.java:136)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2058)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTy peName(XMLHandler.java:1961)
at
org.eclipse.uml2.uml.internal.resource.UML22UMLHandler.creat eObject(UML22UMLHandler.java:62)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1679)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:974)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:87)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:953)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:684)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
... 3 more
Caused by: java.lang.NullPointerException
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDerivedStructur alFeatureID(BasicEObjectImpl.java:1477)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:999)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:994)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:989)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eOpenSet(BasicEO bjectImpl.java:1129)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1108)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1101)
at
org.eclipse.uml2.uml.internal.impl.MessageImpl.eSet(MessageI mpl.java:772)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1141)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
... 32 more



I would be very grateful for any suggestions!

Thanks in advance,
Michael


"James Bruck" <jbruck@ca.ibm.com> schrieb im Newsbeitrag
news:fj3pet$8lg$1@build.eclipse.org...
> Hi Michael,
>
> Would it be possible to post a section of your model that is causing the
> problem? Or if you have steps on recreating the model to reproduce the
> error?
>
> - James.
>
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fj1pnq$sc4$1@build.eclipse.org...
>> Hello Christian,
>>
>> thanks for your tipp. Unfortunately the are no further exceptions being
>> thrown. The stack trace looks like this:
>>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (file:/c:/temp/OnlineShop_SD.uml2, 10, 329)
>> java.lang.NullPointerException
>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:53)
>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:76)
>>
>> I have tried to debug my application. There is no "detailMessage" in the
>> exception. The main cause is an NullPointerException.
>>
>> The sequence diagram isn't very complex. Regrettably the same error
>> occurs, when I try to load a communication diagram (which is very similar
>> to the sequence diagram). I don't have a clue if it is a problem in the
>> model itself (xmi file) or the uml2 api.
>>
>>
>> Greetings,
>> Michael
>>
>>
>>
>> "Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
>> news:8d2f6de5b356efc7761f07c737830ae2$1@www.eclipse.org...
>>> Hi, Michael,
>>>
>>> In my experience, usually the IllegalValueException is caused by some
>>> other exception, because this is just a Resource.Diagnostic indicating
>>> that the something went wrong in setting an EStructuralFeature value.
>>> One problem I've seen before is that an attribute of type String could
>>> not be set because I had a bad UML2 build (or mismatch between EMF and
>>> UML2 versions), in which the uml::String EDataType thought its
>>> classifier ID was 2 but the UMLPackage thought it should be 265 or some
>>> such. The result was that the UMLFactory::createFromString(EDataType,
>>> String) method could not deserialize string values.
>>>
>>> Can you post the whole stack trace, including any "Caused by:"
>>> exceptions?
>>>
>>> Thanks,
>>>
>>> Christian
>>>
>>> Michael Mlynarski wrote:
>>>
>>>> Hello there,
>>>
>>>> I have discovered the following problem: While reading an xmi file
>>>> which contains a UML sequence diagram model (created and exported with
>>>> Enteprise Architect), the following exception is being thrown:
>>>
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>> not legal. (...)
>>>
>>> -----8<-----
>>>
>>>> Thanks in advance for any suggestions,
>>>
>>>> Michael Mlynarski
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625673 is a reply to message #476697] Wed, 05 December 2007 07:51 Go to previous message
chris is currently offline chrisFriend
Messages: 72
Registered: July 2009
Member
Kenn,

shouldn't UML2 be more flexible in this case? I think ignoring the value
(and maybe complaining if it's not consistent with the derived value)
seems to be more appropriate to me... Do you want me to file a bug on that?

Cheers,
Chris


Kenn Hussey schrieb:
> Michael,
>
> I suspect you are seeing this error because the property is read-only. The
> UML2 resource implementation doesn't expect to see values for the
> Message::messageKind property in a serialization because its value is
> derived based on the presence/absence of send/receive events.
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>> Hello there,
>>
>> I have discovered the following problem: While reading an xmi file which
>> contains a UML sequence diagram model (created and exported with Enteprise
>> Architect), the following exception is being thrown:
>>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (...)
>>
>> The xmi file defines the following:
>> (...)
>> <message xmi:type="uml:Message"
>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>> name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>> (...)
>>
>> According to the description of the exception, the "messageKind" cannot
>> have the value "complete", but according to the UML specification (from
>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>
>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>> that identifies the type of message.
>> Generalizations
>> None
>> Description
>> MessageKind is an enumeration of the following values:
>> • complete = sendEvent and receiveEvent are present.
>> • lost = sendEvent present and receiveEvent absent.
>> • found = sendEvent absent and receiveEvent present.
>> • unknown = sendEvent and receiveEvent absent (should not appear).
>>
>>
>> Therefore the "complete" message kind is correct! I cannot find any error
>> in my code, while I'm simply reading the whole model from the xmi like
>> this:
>>
>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>> UMLPackage.Literals.MODEL);
>>
>>
>> Is it a possible bug in the underlying EMF Metamodel for UML? I have tried
>> it with simple messages and signals being sent between the lifelines. The
>> effect is the same. Has anybody have the same problems with sequence
>> diagrams?
>>
>> I'm using:
>> Eclipse 3.3.1
>> EMF 2.3.1
>> UML2 2.1.1
>>
>>
>>
>>
>> Thanks in advance for any suggestions,
>>
>> Michael Mlynarski
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625674 is a reply to message #476697] Wed, 05 December 2007 11:35 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello there,

I've tried to manually delete the 'messageKind="complete"' attribute from
the XML file. Unfortunately futher exceptions are being thrown. What am I
doing wrong? I've attached my model to this e-mail.

The exception being thrown:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a (name:
shop, visibility: <unset>) (visibility: public)' is not legal.
(file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a (name:
shop, visibility: <unset>) (visibility: public)' is not legal.
(file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
at
org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
... 3 more
Caused by: java.lang.ArrayStoreException
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
... 20 more



Thanks in advance,
Michael




"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fj44ki$u1k$1@build.eclipse.org...
> Michael,
>
> I suspect you are seeing this error because the property is read-only. The
> UML2 resource implementation doesn't expect to see values for the
> Message::messageKind property in a serialization because its value is
> derived based on the presence/absence of send/receive events.
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>> Hello there,
>>
>> I have discovered the following problem: While reading an xmi file which
>> contains a UML sequence diagram model (created and exported with
>> Enteprise
>> Architect), the following exception is being thrown:
>>
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>> legal. (...)
>>
>> The xmi file defines the following:
>> (...)
>> <message xmi:type="uml:Message"
>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>> name="loginCustomer(char)" messageKind="complete" messageSort="synchCall"
>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>> (...)
>>
>> According to the description of the exception, the "messageKind" cannot
>> have the value "complete", but according to the UML specification (from
>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>
>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>> that identifies the type of message.
>> Generalizations
>> None
>> Description
>> MessageKind is an enumeration of the following values:
>> . complete = sendEvent and receiveEvent are present.
>> . lost = sendEvent present and receiveEvent absent.
>> . found = sendEvent absent and receiveEvent present.
>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>
>>
>> Therefore the "complete" message kind is correct! I cannot find any error
>> in my code, while I'm simply reading the whole model from the xmi like
>> this:
>>
>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>> UMLPackage.Literals.MODEL);
>>
>>
>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>> tried
>> it with simple messages and signals being sent between the lifelines. The
>> effect is the same. Has anybody have the same problems with sequence
>> diagrams?
>>
>> I'm using:
>> Eclipse 3.3.1
>> EMF 2.3.1
>> UML2 2.1.1
>>
>>
>>
>>
>> Thanks in advance for any suggestions,
>>
>> Michael Mlynarski
>>
>>
>
>


Re: UML2 / Sequence diagram / MessageKind [message #625680 is a reply to message #476702] Thu, 06 December 2007 14:53 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

The format of your mode suggests that it's a UML 2.1(.x) model since it
contains 'packagedElement' elements... but the namespace declaration
(http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of the
Package metaclass was renamed to 'packagedElement' in UML 2.1...

Kenn


"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fj62em$qud$1@build.eclipse.org...
> Hello there,
>
> I've tried to manually delete the 'messageKind="complete"' attribute from
> the XML file. Unfortunately futher exceptions are being thrown. What am I
> doing wrong? I've attached my model to this e-mail.
>
> The exception being thrown:
>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
> at
> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
> Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
> ... 3 more
> Caused by: java.lang.ArrayStoreException
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
> ... 20 more
>
>
>
> Thanks in advance,
> Michael
>
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fj44ki$u1k$1@build.eclipse.org...
>> Michael,
>>
>> I suspect you are seeing this error because the property is read-only.
>> The
>> UML2 resource implementation doesn't expect to see values for the
>> Message::messageKind property in a serialization because its value is
>> derived based on the presence/absence of send/receive events.
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>> Hello there,
>>>
>>> I have discovered the following problem: While reading an xmi file which
>>> contains a UML sequence diagram model (created and exported with
>>> Enteprise
>>> Architect), the following exception is being thrown:
>>>
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>>> legal. (...)
>>>
>>> The xmi file defines the following:
>>> (...)
>>> <message xmi:type="uml:Message"
>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>> name="loginCustomer(char)" messageKind="complete"
>>> messageSort="synchCall"
>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>> (...)
>>>
>>> According to the description of the exception, the "messageKind" cannot
>>> have the value "complete", but according to the UML specification (from
>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>
>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>>> that identifies the type of message.
>>> Generalizations
>>> None
>>> Description
>>> MessageKind is an enumeration of the following values:
>>> . complete = sendEvent and receiveEvent are present.
>>> . lost = sendEvent present and receiveEvent absent.
>>> . found = sendEvent absent and receiveEvent present.
>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>
>>>
>>> Therefore the "complete" message kind is correct! I cannot find any
>>> error
>>> in my code, while I'm simply reading the whole model from the xmi like
>>> this:
>>>
>>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.MODEL);
>>>
>>>
>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>> tried
>>> it with simple messages and signals being sent between the lifelines.
>>> The
>>> effect is the same. Has anybody have the same problems with sequence
>>> diagrams?
>>>
>>> I'm using:
>>> Eclipse 3.3.1
>>> EMF 2.3.1
>>> UML2 2.1.1
>>>
>>>
>>>
>>>
>>> Thanks in advance for any suggestions,
>>>
>>> Michael Mlynarski
>>>
>>>
>>
>>
>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625681 is a reply to message #476701] Thu, 06 December 2007 15:03 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Chris,

This behavior is being provided by the EMF - when an attempt to set the
value for a feature fails, the exception is wrapped in an
IllegalValueException and added to the list of errors for the resource.
Unfortunately, it may seem like the entire load has failed since calls to
ResourceSet#getResource(URI, boolean) won't return a result. One way to work
around this would be to write code more like this:

Resource resource = null;
try {
resource = resourceSet.getResource(uri, true);
}catch (Exception e) {
resource = resourceSet.getResource(uri, false);
if (resource != null) {
// inspect list of errors returned by resource.getErrors()
}
}

Kenn

"chris" <chris_42@gmx.net> wrote in message
news:fj5l9m$v9d$1@build.eclipse.org...
> Kenn,
>
> shouldn't UML2 be more flexible in this case? I think ignoring the value
> (and maybe complaining if it's not consistent with the derived value)
> seems to be more appropriate to me... Do you want me to file a bug on
> that?
>
> Cheers,
> Chris
>
>
> Kenn Hussey schrieb:
>> Michael,
>>
>> I suspect you are seeing this error because the property is read-only.
>> The
>> UML2 resource implementation doesn't expect to see values for the
>> Message::messageKind property in a serialization because its value is
>> derived based on the presence/absence of send/receive events.
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>> Hello there,
>>>
>>> I have discovered the following problem: While reading an xmi file which
>>> contains a UML sequence diagram model (created and exported with
>>> Enteprise
>>> Architect), the following exception is being thrown:
>>>
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is not
>>> legal. (...)
>>>
>>> The xmi file defines the following:
>>> (...)
>>> <message xmi:type="uml:Message"
>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>> name="loginCustomer(char)" messageKind="complete"
>>> messageSort="synchCall"
>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>> (...)
>>>
>>> According to the description of the exception, the "messageKind" cannot
>>> have the value "complete", but according to the UML specification (from
>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>
>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>>> that identifies the type of message.
>>> Generalizations
>>> None
>>> Description
>>> MessageKind is an enumeration of the following values:
>>> . complete = sendEvent and receiveEvent are present.
>>> . lost = sendEvent present and receiveEvent absent.
>>> . found = sendEvent absent and receiveEvent present.
>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>
>>>
>>> Therefore the "complete" message kind is correct! I cannot find any
>>> error
>>> in my code, while I'm simply reading the whole model from the xmi like
>>> this:
>>>
>>> Model _model = (Model) EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.MODEL);
>>>
>>>
>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>> tried
>>> it with simple messages and signals being sent between the lifelines.
>>> The
>>> effect is the same. Has anybody have the same problems with sequence
>>> diagrams?
>>>
>>> I'm using:
>>> Eclipse 3.3.1
>>> EMF 2.3.1
>>> UML2 2.1.1
>>>
>>>
>>>
>>>
>>> Thanks in advance for any suggestions,
>>>
>>> Michael Mlynarski
>>>
>>>
>>
>>
Re: UML2 / Sequence diagram / MessageKind [message #625688 is a reply to message #476708] Fri, 07 December 2007 14:35 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hi Kenn,

I use this namespace declaration to read my model. My Enterprise Architect
is generating the xmi file with the following namespace:
xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
read and I'm retrieving an NullPointerException. Using the
http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML models,
but within sequence diagrams I become the IllegalValueException.

Are there any other namespaces I should use? I have used the
eclipse-namespace according to:
http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/


Best regards,
Michael


"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fj92cr$4b0$1@build.eclipse.org...
> Michael,
>
> The format of your mode suggests that it's a UML 2.1(.x) model since it
> contains 'packagedElement' elements... but the namespace declaration
> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>
> Kenn
>
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fj62em$qud$1@build.eclipse.org...
>> Hello there,
>>
>> I've tried to manually delete the 'messageKind="complete"' attribute from
>> the XML file. Unfortunately futher exceptions are being thrown. What am I
>> doing wrong? I've attached my model to this e-mail.
>>
>> The exception being thrown:
>>
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>> at
>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>> Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>> ... 3 more
>> Caused by: java.lang.ArrayStoreException
>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>> ... 20 more
>>
>>
>>
>> Thanks in advance,
>> Michael
>>
>>
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fj44ki$u1k$1@build.eclipse.org...
>>> Michael,
>>>
>>> I suspect you are seeing this error because the property is read-only.
>>> The
>>> UML2 resource implementation doesn't expect to see values for the
>>> Message::messageKind property in a serialization because its value is
>>> derived based on the presence/absence of send/receive events.
>>>
>>> Kenn
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>> Hello there,
>>>>
>>>> I have discovered the following problem: While reading an xmi file
>>>> which
>>>> contains a UML sequence diagram model (created and exported with
>>>> Enteprise
>>>> Architect), the following exception is being thrown:
>>>>
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>> not
>>>> legal. (...)
>>>>
>>>> The xmi file defines the following:
>>>> (...)
>>>> <message xmi:type="uml:Message"
>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>> name="loginCustomer(char)" messageKind="complete"
>>>> messageSort="synchCall"
>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>> (...)
>>>>
>>>> According to the description of the exception, the "messageKind" cannot
>>>> have the value "complete", but according to the UML specification (from
>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>
>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated type
>>>> that identifies the type of message.
>>>> Generalizations
>>>> None
>>>> Description
>>>> MessageKind is an enumeration of the following values:
>>>> . complete = sendEvent and receiveEvent are present.
>>>> . lost = sendEvent present and receiveEvent absent.
>>>> . found = sendEvent absent and receiveEvent present.
>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>
>>>>
>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>> error
>>>> in my code, while I'm simply reading the whole model from the xmi like
>>>> this:
>>>>
>>>> Model _model = (Model)
>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>> UMLPackage.Literals.MODEL);
>>>>
>>>>
>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>> tried
>>>> it with simple messages and signals being sent between the lifelines.
>>>> The
>>>> effect is the same. Has anybody have the same problems with sequence
>>>> diagrams?
>>>>
>>>> I'm using:
>>>> Eclipse 3.3.1
>>>> EMF 2.3.1
>>>> UML2 2.1.1
>>>>
>>>>
>>>>
>>>>
>>>> Thanks in advance for any suggestions,
>>>>
>>>> Michael Mlynarski
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625690 is a reply to message #476716] Sat, 08 December 2007 02:26 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

A file ending with a .xmi extension and containing valid elements from the
'http://schema.omg.org/spec/UML/2.1' namespace should load without problem
in the UML2 editor; the UML2 equivalent of this namespace (for files with a
..uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using this
namespace (with a 2.0.0 instead of 1.0.0) work for you?

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjblnt$1mq$1@build.eclipse.org...
> Hi Kenn,
>
> I use this namespace declaration to read my model. My Enterprise Architect
> is generating the xmi file with the following namespace:
> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
> read and I'm retrieving an NullPointerException. Using the
> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML models,
> but within sequence diagrams I become the IllegalValueException.
>
> Are there any other namespaces I should use? I have used the
> eclipse-namespace according to:
> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>
>
> Best regards,
> Michael
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fj92cr$4b0$1@build.eclipse.org...
>> Michael,
>>
>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>> contains 'packagedElement' elements... but the namespace declaration
>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>
>> Kenn
>>
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fj62em$qud$1@build.eclipse.org...
>>> Hello there,
>>>
>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>> What am I doing wrong? I've attached my model to this e-mail.
>>>
>>> The exception being thrown:
>>>
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>> at
>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>> Source)
>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>> Source)
>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>> ... 3 more
>>> Caused by: java.lang.ArrayStoreException
>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>> ... 20 more
>>>
>>>
>>>
>>> Thanks in advance,
>>> Michael
>>>
>>>
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> I suspect you are seeing this error because the property is read-only.
>>>> The
>>>> UML2 resource implementation doesn't expect to see values for the
>>>> Message::messageKind property in a serialization because its value is
>>>> derived based on the presence/absence of send/receive events.
>>>>
>>>> Kenn
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>> Hello there,
>>>>>
>>>>> I have discovered the following problem: While reading an xmi file
>>>>> which
>>>>> contains a UML sequence diagram model (created and exported with
>>>>> Enteprise
>>>>> Architect), the following exception is being thrown:
>>>>>
>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>> not
>>>>> legal. (...)
>>>>>
>>>>> The xmi file defines the following:
>>>>> (...)
>>>>> <message xmi:type="uml:Message"
>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>> messageSort="synchCall"
>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>> (...)
>>>>>
>>>>> According to the description of the exception, the "messageKind"
>>>>> cannot
>>>>> have the value "complete", but according to the UML specification
>>>>> (from
>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>
>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>> type
>>>>> that identifies the type of message.
>>>>> Generalizations
>>>>> None
>>>>> Description
>>>>> MessageKind is an enumeration of the following values:
>>>>> . complete = sendEvent and receiveEvent are present.
>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>> . found = sendEvent absent and receiveEvent present.
>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>
>>>>>
>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>> error
>>>>> in my code, while I'm simply reading the whole model from the xmi like
>>>>> this:
>>>>>
>>>>> Model _model = (Model)
>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>> UMLPackage.Literals.MODEL);
>>>>>
>>>>>
>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>> tried
>>>>> it with simple messages and signals being sent between the lifelines.
>>>>> The
>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>> diagrams?
>>>>>
>>>>> I'm using:
>>>>> Eclipse 3.3.1
>>>>> EMF 2.3.1
>>>>> UML2 2.1.1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance for any suggestions,
>>>>>
>>>>> Michael Mlynarski
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625693 is a reply to message #476718] Sun, 09 December 2007 15:40 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello Kenn,

I've found a way to read my UML models! After creating the model in
Enterprise Architect I use the "Export to XMI" function. My XMI Output is
correct according to UML2.1/XMI 2.1 and the files end with *.uml2 suffix.
Then I manually change the namespace from http://schema.omg.org/spec/UML/2.1
to http://www.eclipse.org/uml2/2.1.0/UML
The next step is to read the *.uml2 file in Eclipse UML2 editor. This action
is opening my model and automatically (!) generating an *.uml file (not
*.uml2!). This file is readable with my code.

For comparison I attach both files (*.uml2 and the *.uml).

My observations:
- the structure of the *.uml differs from the original file
- there are no "messageKind" parameters being used

Why does this happen? Is Enterprise Architect generating incorrect files? Or
does UML2 expect an other kind of xml schema?


Regards,
Michael



"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fjcvda$io2$1@build.eclipse.org...
> Michael,
>
> A file ending with a .xmi extension and containing valid elements from the
> 'http://schema.omg.org/spec/UML/2.1' namespace should load without problem
> in the UML2 editor; the UML2 equivalent of this namespace (for files with
> a
> .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using
> this
> namespace (with a 2.0.0 instead of 1.0.0) work for you?
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjblnt$1mq$1@build.eclipse.org...
>> Hi Kenn,
>>
>> I use this namespace declaration to read my model. My Enterprise
>> Architect
>> is generating the xmi file with the following namespace:
>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>> read and I'm retrieving an NullPointerException. Using the
>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>> models,
>> but within sequence diagrams I become the IllegalValueException.
>>
>> Are there any other namespaces I should use? I have used the
>> eclipse-namespace according to:
>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>
>>
>> Best regards,
>> Michael
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fj92cr$4b0$1@build.eclipse.org...
>>> Michael,
>>>
>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>> contains 'packagedElement' elements... but the namespace declaration
>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
>>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>
>>> Kenn
>>>
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fj62em$qud$1@build.eclipse.org...
>>>> Hello there,
>>>>
>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>
>>>> The exception being thrown:
>>>>
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>> at
>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>> ... 3 more
>>>> Caused by: java.lang.ArrayStoreException
>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>> ... 20 more
>>>>
>>>>
>>>>
>>>> Thanks in advance,
>>>> Michael
>>>>
>>>>
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> I suspect you are seeing this error because the property is read-only.
>>>>> The
>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>> Message::messageKind property in a serialization because its value is
>>>>> derived based on the presence/absence of send/receive events.
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>> Hello there,
>>>>>>
>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>> which
>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>> Enteprise
>>>>>> Architect), the following exception is being thrown:
>>>>>>
>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>> not
>>>>>> legal. (...)
>>>>>>
>>>>>> The xmi file defines the following:
>>>>>> (...)
>>>>>> <message xmi:type="uml:Message"
>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>> messageSort="synchCall"
>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>> (...)
>>>>>>
>>>>>> According to the description of the exception, the "messageKind"
>>>>>> cannot
>>>>>> have the value "complete", but according to the UML specification
>>>>>> (from
>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>
>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>> type
>>>>>> that identifies the type of message.
>>>>>> Generalizations
>>>>>> None
>>>>>> Description
>>>>>> MessageKind is an enumeration of the following values:
>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>
>>>>>>
>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>> error
>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>> like
>>>>>> this:
>>>>>>
>>>>>> Model _model = (Model)
>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>> UMLPackage.Literals.MODEL);
>>>>>>
>>>>>>
>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>> tried
>>>>>> it with simple messages and signals being sent between the lifelines.
>>>>>> The
>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>> diagrams?
>>>>>>
>>>>>> I'm using:
>>>>>> Eclipse 3.3.1
>>>>>> EMF 2.3.1
>>>>>> UML2 2.1.1
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks in advance for any suggestions,
>>>>>>
>>>>>> Michael Mlynarski
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: UML2 / Sequence diagram / MessageKind [message #625694 is a reply to message #476718] Sun, 09 December 2007 17:03 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Hello again,

I've found, that the automatic transformation (from *.uml2 to *.uml) isn't
correct. For example each Lifeline in my sequence diagram is represented by
a specific class (is an instance of a specific class). In the original xmi
file (*.uml2) it looks like this:

(...)
<lifeline xmi:type="uml:Lifeline"
xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
visibility="public"
represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
</ownedBehavior>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
<type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
<type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
<type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
<type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
<type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
<type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property"
xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
<type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
</ownedAttribute>
(...)

In the new file, which was generated with the UML2 editor, several
connections to the representant (through "xmi:type") are missing! Here the
relevant part of the *.uml file:

(...)
</ownedBehavior>
<ownedAttribute
xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
<ownedAttribute
xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
</packagedElement>
(...)

Only the first lifeline is connected with a representant (see type="..."
attribute). Is it a possible bug in the automatic conversion from *.uml2 to
*.uml in the UML2 editor?

I've posted my models in my last post (09.12.2007, 16.40 PM).


Thanks in advance,
Michael



"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fjcvda$io2$1@build.eclipse.org...
> Michael,
>
> A file ending with a .xmi extension and containing valid elements from the
> 'http://schema.omg.org/spec/UML/2.1' namespace should load without problem
> in the UML2 editor; the UML2 equivalent of this namespace (for files with
> a .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using
> this namespace (with a 2.0.0 instead of 1.0.0) work for you?
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjblnt$1mq$1@build.eclipse.org...
>> Hi Kenn,
>>
>> I use this namespace declaration to read my model. My Enterprise
>> Architect is generating the xmi file with the following namespace:
>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>> read and I'm retrieving an NullPointerException. Using the
>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>> models, but within sequence diagrams I become the IllegalValueException.
>>
>> Are there any other namespaces I should use? I have used the
>> eclipse-namespace according to:
>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>
>>
>> Best regards,
>> Michael
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fj92cr$4b0$1@build.eclipse.org...
>>> Michael,
>>>
>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>> contains 'packagedElement' elements... but the namespace declaration
>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version of
>>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>
>>> Kenn
>>>
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fj62em$qud$1@build.eclipse.org...
>>>> Hello there,
>>>>
>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>
>>>> The exception being thrown:
>>>>
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>> at
>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>> ... 3 more
>>>> Caused by: java.lang.ArrayStoreException
>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>> ... 20 more
>>>>
>>>>
>>>>
>>>> Thanks in advance,
>>>> Michael
>>>>
>>>>
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> I suspect you are seeing this error because the property is read-only.
>>>>> The
>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>> Message::messageKind property in a serialization because its value is
>>>>> derived based on the presence/absence of send/receive events.
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>> Hello there,
>>>>>>
>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>> which
>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>> Enteprise
>>>>>> Architect), the following exception is being thrown:
>>>>>>
>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>> not
>>>>>> legal. (...)
>>>>>>
>>>>>> The xmi file defines the following:
>>>>>> (...)
>>>>>> <message xmi:type="uml:Message"
>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>> messageSort="synchCall"
>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>> (...)
>>>>>>
>>>>>> According to the description of the exception, the "messageKind"
>>>>>> cannot
>>>>>> have the value "complete", but according to the UML specification
>>>>>> (from
>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>
>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>> type
>>>>>> that identifies the type of message.
>>>>>> Generalizations
>>>>>> None
>>>>>> Description
>>>>>> MessageKind is an enumeration of the following values:
>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>
>>>>>>
>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>> error
>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>> like
>>>>>> this:
>>>>>>
>>>>>> Model _model = (Model)
>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>> UMLPackage.Literals.MODEL);
>>>>>>
>>>>>>
>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>> tried
>>>>>> it with simple messages and signals being sent between the lifelines.
>>>>>> The
>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>> diagrams?
>>>>>>
>>>>>> I'm using:
>>>>>> Eclipse 3.3.1
>>>>>> EMF 2.3.1
>>>>>> UML2 2.1.1
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks in advance for any suggestions,
>>>>>>
>>>>>> Michael Mlynarski
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625697 is a reply to message #476720] Mon, 10 December 2007 15:12 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

If the files that are exported are indeed compliant with UML 2.1, you
shouldn't need to change the namespace - just change the file extension to
'.xmi'.

The UML2 editor automatically migrates models based on the older (UML2 1.x)
format, with a file extension of '.uml2', to the latest format (UML2 2.x),
with a file extension of '.uml'. The structure of the .uml files will differ
from the structure of the (original) .uml2 files because they are being
saved using the UML2 resource implementation; values for the
Message::messageKind property are not saved because, as as stated
previously, this property is read-only and derived (caculated) based on the
values of other properties and hence needs not have its values persisted.

The tool you are using should not be generating files with a .uml2 extension
if the content it is generating is based on UML 2.1 (UML2 2.x). It should
also probably not be serializing values for the 'messageKind' property...

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjh2a2$67s$1@build.eclipse.org...
> Hello Kenn,
>
> I've found a way to read my UML models! After creating the model in
> Enterprise Architect I use the "Export to XMI" function. My XMI Output is
> correct according to UML2.1/XMI 2.1 and the files end with *.uml2 suffix.
> Then I manually change the namespace from
> http://schema.omg.org/spec/UML/2.1 to
> http://www.eclipse.org/uml2/2.1.0/UML
> The next step is to read the *.uml2 file in Eclipse UML2 editor. This
> action is opening my model and automatically (!) generating an *.uml file
> (not *.uml2!). This file is readable with my code.
>
> For comparison I attach both files (*.uml2 and the *.uml).
>
> My observations:
> - the structure of the *.uml differs from the original file
> - there are no "messageKind" parameters being used
>
> Why does this happen? Is Enterprise Architect generating incorrect files?
> Or does UML2 expect an other kind of xml schema?
>
>
> Regards,
> Michael
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fjcvda$io2$1@build.eclipse.org...
>> Michael,
>>
>> A file ending with a .xmi extension and containing valid elements from
>> the
>> 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>> problem
>> in the UML2 editor; the UML2 equivalent of this namespace (for files with
>> a
>> .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using
>> this
>> namespace (with a 2.0.0 instead of 1.0.0) work for you?
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fjblnt$1mq$1@build.eclipse.org...
>>> Hi Kenn,
>>>
>>> I use this namespace declaration to read my model. My Enterprise
>>> Architect
>>> is generating the xmi file with the following namespace:
>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>>> read and I'm retrieving an NullPointerException. Using the
>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>> models,
>>> but within sequence diagrams I become the IllegalValueException.
>>>
>>> Are there any other namespaces I should use? I have used the
>>> eclipse-namespace according to:
>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>>
>>>
>>> Best regards,
>>> Michael
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>>> contains 'packagedElement' elements... but the namespace declaration
>>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version
>>>> of
>>>> UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property of
>>>> the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>>
>>>> Kenn
>>>>
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>> Hello there,
>>>>>
>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>
>>>>> The exception being thrown:
>>>>>
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>> at
>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>> Source)
>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>> ... 3 more
>>>>> Caused by: java.lang.ArrayStoreException
>>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>> ... 20 more
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Michael
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>> Michael,
>>>>>>
>>>>>> I suspect you are seeing this error because the property is
>>>>>> read-only.
>>>>>> The
>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>> Message::messageKind property in a serialization because its value is
>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>> Hello there,
>>>>>>>
>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>> which
>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>> Enteprise
>>>>>>> Architect), the following exception is being thrown:
>>>>>>>
>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>>> not
>>>>>>> legal. (...)
>>>>>>>
>>>>>>> The xmi file defines the following:
>>>>>>> (...)
>>>>>>> <message xmi:type="uml:Message"
>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>> messageSort="synchCall"
>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>> (...)
>>>>>>>
>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>> cannot
>>>>>>> have the value "complete", but according to the UML specification
>>>>>>> (from
>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>
>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>> type
>>>>>>> that identifies the type of message.
>>>>>>> Generalizations
>>>>>>> None
>>>>>>> Description
>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>
>>>>>>>
>>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>>> error
>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>> like
>>>>>>> this:
>>>>>>>
>>>>>>> Model _model = (Model)
>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>
>>>>>>>
>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>>> tried
>>>>>>> it with simple messages and signals being sent between the
>>>>>>> lifelines.
>>>>>>> The
>>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>>> diagrams?
>>>>>>>
>>>>>>> I'm using:
>>>>>>> Eclipse 3.3.1
>>>>>>> EMF 2.3.1
>>>>>>> UML2 2.1.1
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks in advance for any suggestions,
>>>>>>>
>>>>>>> Michael Mlynarski
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625698 is a reply to message #476721] Mon, 10 December 2007 15:24 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

An instance specification cannot be used as the type of a property in UML -
InstanceSpecification is not a specialization of Type... I suspect these
references are being discarded because they are invalid (when I tried
opening the model, a number of errors appeared on the 'Problems' tab of the
UML editor). I think the bug is in the tool that you are using to produce
the original UML model...

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjh74b$udl$1@build.eclipse.org...
> Hello again,
>
> I've found, that the automatic transformation (from *.uml2 to *.uml) isn't
> correct. For example each Lifeline in my sequence diagram is represented
> by a specific class (is an instance of a specific class). In the original
> xmi file (*.uml2) it looks like this:
>
> (...)
> <lifeline xmi:type="uml:Lifeline"
> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
> visibility="public"
> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
> </ownedBehavior>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
> </ownedAttribute>
> (...)
>
> In the new file, which was generated with the UML2 editor, several
> connections to the representant (through "xmi:type") are missing! Here the
> relevant part of the *.uml file:
>
> (...)
> </ownedBehavior>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
> <ownedAttribute
> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
> </packagedElement>
> (...)
>
> Only the first lifeline is connected with a representant (see type="..."
> attribute). Is it a possible bug in the automatic conversion from *.uml2
> to *.uml in the UML2 editor?
>
> I've posted my models in my last post (09.12.2007, 16.40 PM).
>
>
> Thanks in advance,
> Michael
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fjcvda$io2$1@build.eclipse.org...
>> Michael,
>>
>> A file ending with a .xmi extension and containing valid elements from
>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>> files with a .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'.
>> Does using this namespace (with a 2.0.0 instead of 1.0.0) work for you?
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fjblnt$1mq$1@build.eclipse.org...
>>> Hi Kenn,
>>>
>>> I use this namespace declaration to read my model. My Enterprise
>>> Architect is generating the xmi file with the following namespace:
>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot be
>>> read and I'm retrieving an NullPointerException. Using the
>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>> models, but within sequence diagrams I become the IllegalValueException.
>>>
>>> Are there any other namespaces I should use? I have used the
>>> eclipse-namespace according to:
>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>>
>>>
>>> Best regards,
>>> Michael
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> The format of your mode suggests that it's a UML 2.1(.x) model since it
>>>> contains 'packagedElement' elements... but the namespace declaration
>>>> (http://www.eclipse.org/uml2/1.0.0/UML") references the older version
>>>> of UML2 which was (nearly) based on UML 2.0. The 'ownedMember' property
>>>> of the Package metaclass was renamed to 'packagedElement' in UML 2.1...
>>>>
>>>> Kenn
>>>>
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>> Hello there,
>>>>>
>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>
>>>>> The exception being thrown:
>>>>>
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>> at
>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>> Source)
>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>> ... 3 more
>>>>> Caused by: java.lang.ArrayStoreException
>>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>> ... 20 more
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Michael
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>> Michael,
>>>>>>
>>>>>> I suspect you are seeing this error because the property is
>>>>>> read-only. The
>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>> Message::messageKind property in a serialization because its value is
>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>> Hello there,
>>>>>>>
>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>> which
>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>> Enteprise
>>>>>>> Architect), the following exception is being thrown:
>>>>>>>
>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete' is
>>>>>>> not
>>>>>>> legal. (...)
>>>>>>>
>>>>>>> The xmi file defines the following:
>>>>>>> (...)
>>>>>>> <message xmi:type="uml:Message"
>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>> messageSort="synchCall"
>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>> (...)
>>>>>>>
>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>> cannot
>>>>>>> have the value "complete", but according to the UML specification
>>>>>>> (from
>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>
>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>> type
>>>>>>> that identifies the type of message.
>>>>>>> Generalizations
>>>>>>> None
>>>>>>> Description
>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>
>>>>>>>
>>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>>> error
>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>> like
>>>>>>> this:
>>>>>>>
>>>>>>> Model _model = (Model)
>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>
>>>>>>>
>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I have
>>>>>>> tried
>>>>>>> it with simple messages and signals being sent between the
>>>>>>> lifelines. The
>>>>>>> effect is the same. Has anybody have the same problems with sequence
>>>>>>> diagrams?
>>>>>>>
>>>>>>> I'm using:
>>>>>>> Eclipse 3.3.1
>>>>>>> EMF 2.3.1
>>>>>>> UML2 2.1.1
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks in advance for any suggestions,
>>>>>>>
>>>>>>> Michael Mlynarski
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625711 is a reply to message #476725] Wed, 12 December 2007 01:50 Go to previous message
Eclipse UserFriend
Originally posted by: michael.mlynarski.info

Kenn,

thanks for your advices. As I have to implement my small application for
analysing heterogenous uml models fast, I have modelled the sequence diagram
in the UML2 editor. For now it works fine.

I think it's a little bit strange, that the Enterprise Architect (being
recommended directly from OMG) is generating incorrect xmi output. The
interchange between different uml modeling tools with xmi files seems to be
really complicated.


Regards,
Michael


"Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
news:fjjlno$hpg$1@build.eclipse.org...
> Michael,
>
> An instance specification cannot be used as the type of a property in
> UML - InstanceSpecification is not a specialization of Type... I suspect
> these references are being discarded because they are invalid (when I
> tried opening the model, a number of errors appeared on the 'Problems' tab
> of the UML editor). I think the bug is in the tool that you are using to
> produce the original UML model...
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjh74b$udl$1@build.eclipse.org...
>> Hello again,
>>
>> I've found, that the automatic transformation (from *.uml2 to *.uml)
>> isn't correct. For example each Lifeline in my sequence diagram is
>> represented by a specific class (is an instance of a specific class). In
>> the original xmi file (*.uml2) it looks like this:
>>
>> (...)
>> <lifeline xmi:type="uml:Lifeline"
>> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
>> visibility="public"
>> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
>> </ownedBehavior>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
>> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
>> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
>> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
>> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
>> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
>> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Property"
>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
>> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
>> </ownedAttribute>
>> (...)
>>
>> In the new file, which was generated with the UML2 editor, several
>> connections to the representant (through "xmi:type") are missing! Here
>> the relevant part of the *.uml file:
>>
>> (...)
>> </ownedBehavior>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
>> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
>> <ownedAttribute
>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
>> </packagedElement>
>> (...)
>>
>> Only the first lifeline is connected with a representant (see type="..."
>> attribute). Is it a possible bug in the automatic conversion from *.uml2
>> to *.uml in the UML2 editor?
>>
>> I've posted my models in my last post (09.12.2007, 16.40 PM).
>>
>>
>> Thanks in advance,
>> Michael
>>
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fjcvda$io2$1@build.eclipse.org...
>>> Michael,
>>>
>>> A file ending with a .xmi extension and containing valid elements from
>>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>>> files with a .uml extension) is 'http://www.eclipse.org/uml2/2.0.0/UML'.
>>> Does using this namespace (with a 2.0.0 instead of 1.0.0) work for you?
>>>
>>> Kenn
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fjblnt$1mq$1@build.eclipse.org...
>>>> Hi Kenn,
>>>>
>>>> I use this namespace declaration to read my model. My Enterprise
>>>> Architect is generating the xmi file with the following namespace:
>>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot
>>>> be read and I'm retrieving an NullPointerException. Using the
>>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>>> models, but within sequence diagrams I become the
>>>> IllegalValueException.
>>>>
>>>> Are there any other namespaces I should use? I have used the
>>>> eclipse-namespace according to:
>>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>>>
>>>>
>>>> Best regards,
>>>> Michael
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> The format of your mode suggests that it's a UML 2.1(.x) model since
>>>>> it contains 'packagedElement' elements... but the namespace
>>>>> declaration (http://www.eclipse.org/uml2/1.0.0/UML") references the
>>>>> older version of UML2 which was (nearly) based on UML 2.0. The
>>>>> 'ownedMember' property of the Package metaclass was renamed to
>>>>> 'packagedElement' in UML 2.1...
>>>>>
>>>>> Kenn
>>>>>
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>>> Hello there,
>>>>>>
>>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>>
>>>>>> The exception being thrown:
>>>>>>
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not legal.
>>>>>> (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>> at
>>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>>> Source)
>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>> ... 3 more
>>>>>> Caused by: java.lang.ArrayStoreException
>>>>>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>>> at
>>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>>> at
>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>>> at
>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>>> ... 20 more
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Michael
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>>> Michael,
>>>>>>>
>>>>>>> I suspect you are seeing this error because the property is
>>>>>>> read-only. The
>>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>>> Message::messageKind property in a serialization because its value
>>>>>>> is
>>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>>> Hello there,
>>>>>>>>
>>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>>> which
>>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>>> Enteprise
>>>>>>>> Architect), the following exception is being thrown:
>>>>>>>>
>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
>>>>>>>> is not
>>>>>>>> legal. (...)
>>>>>>>>
>>>>>>>> The xmi file defines the following:
>>>>>>>> (...)
>>>>>>>> <message xmi:type="uml:Message"
>>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>>> messageSort="synchCall"
>>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>>> (...)
>>>>>>>>
>>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>>> cannot
>>>>>>>> have the value "complete", but according to the UML specification
>>>>>>>> (from
>>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>>
>>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>>> type
>>>>>>>> that identifies the type of message.
>>>>>>>> Generalizations
>>>>>>>> None
>>>>>>>> Description
>>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>>
>>>>>>>>
>>>>>>>> Therefore the "complete" message kind is correct! I cannot find any
>>>>>>>> error
>>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>>> like
>>>>>>>> this:
>>>>>>>>
>>>>>>>> Model _model = (Model)
>>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>>
>>>>>>>>
>>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I
>>>>>>>> have tried
>>>>>>>> it with simple messages and signals being sent between the
>>>>>>>> lifelines. The
>>>>>>>> effect is the same. Has anybody have the same problems with
>>>>>>>> sequence
>>>>>>>> diagrams?
>>>>>>>>
>>>>>>>> I'm using:
>>>>>>>> Eclipse 3.3.1
>>>>>>>> EMF 2.3.1
>>>>>>>> UML2 2.1.1
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks in advance for any suggestions,
>>>>>>>>
>>>>>>>> Michael Mlynarski
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625721 is a reply to message #476738] Wed, 12 December 2007 18:56 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

The problem is that the XMI specification (like most) leaves room for
interpretation in certain areas... Note, however, that serialization of
derived properties is explicitly discouraged by the (latest) XMI
specification...

Kenn

"Michael Mlynarski" <michael@mlynarski.info> wrote in message
news:fjneri$3md$1@build.eclipse.org...
> Kenn,
>
> thanks for your advices. As I have to implement my small application for
> analysing heterogenous uml models fast, I have modelled the sequence
> diagram in the UML2 editor. For now it works fine.
>
> I think it's a little bit strange, that the Enterprise Architect (being
> recommended directly from OMG) is generating incorrect xmi output. The
> interchange between different uml modeling tools with xmi files seems to
> be really complicated.
>
>
> Regards,
> Michael
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
> news:fjjlno$hpg$1@build.eclipse.org...
>> Michael,
>>
>> An instance specification cannot be used as the type of a property in
>> UML - InstanceSpecification is not a specialization of Type... I suspect
>> these references are being discarded because they are invalid (when I
>> tried opening the model, a number of errors appeared on the 'Problems'
>> tab of the UML editor). I think the bug is in the tool that you are using
>> to produce the original UML model...
>>
>> Kenn
>>
>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>> news:fjh74b$udl$1@build.eclipse.org...
>>> Hello again,
>>>
>>> I've found, that the automatic transformation (from *.uml2 to *.uml)
>>> isn't correct. For example each Lifeline in my sequence diagram is
>>> represented by a specific class (is an instance of a specific class). In
>>> the original xmi file (*.uml2) it looks like this:
>>>
>>> (...)
>>> <lifeline xmi:type="uml:Lifeline"
>>> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
>>> visibility="public"
>>> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
>>> </ownedBehavior>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
>>> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
>>> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
>>> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
>>> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
>>> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
>>> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
>>> </ownedAttribute>
>>> <ownedAttribute xmi:type="uml:Property"
>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
>>> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
>>> </ownedAttribute>
>>> (...)
>>>
>>> In the new file, which was generated with the UML2 editor, several
>>> connections to the representant (through "xmi:type") are missing! Here
>>> the relevant part of the *.uml file:
>>>
>>> (...)
>>> </ownedBehavior>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
>>> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
>>> <ownedAttribute
>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
>>> </packagedElement>
>>> (...)
>>>
>>> Only the first lifeline is connected with a representant (see type="..."
>>> attribute). Is it a possible bug in the automatic conversion from *.uml2
>>> to *.uml in the UML2 editor?
>>>
>>> I've posted my models in my last post (09.12.2007, 16.40 PM).
>>>
>>>
>>> Thanks in advance,
>>> Michael
>>>
>>>
>>>
>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>> news:fjcvda$io2$1@build.eclipse.org...
>>>> Michael,
>>>>
>>>> A file ending with a .xmi extension and containing valid elements from
>>>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>>>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>>>> files with a .uml extension) is
>>>> 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using this namespace
>>>> (with a 2.0.0 instead of 1.0.0) work for you?
>>>>
>>>> Kenn
>>>>
>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>> news:fjblnt$1mq$1@build.eclipse.org...
>>>>> Hi Kenn,
>>>>>
>>>>> I use this namespace declaration to read my model. My Enterprise
>>>>> Architect is generating the xmi file with the following namespace:
>>>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot
>>>>> be read and I'm retrieving an NullPointerException. Using the
>>>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>>>> models, but within sequence diagrams I become the
>>>>> IllegalValueException.
>>>>>
>>>>> Are there any other namespaces I should use? I have used the
>>>>> eclipse-namespace according to:
>>>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Michael
>>>>>
>>>>>
>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>>>> Michael,
>>>>>>
>>>>>> The format of your mode suggests that it's a UML 2.1(.x) model since
>>>>>> it contains 'packagedElement' elements... but the namespace
>>>>>> declaration (http://www.eclipse.org/uml2/1.0.0/UML") references the
>>>>>> older version of UML2 which was (nearly) based on UML 2.0. The
>>>>>> 'ownedMember' property of the Package metaclass was renamed to
>>>>>> 'packagedElement' in UML 2.1...
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>>
>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>>>> Hello there,
>>>>>>>
>>>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>>>
>>>>>>> The exception being thrown:
>>>>>>>
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>> at
>>>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>>>> Source)
>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>> ... 3 more
>>>>>>> Caused by: java.lang.ArrayStoreException
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>>>> at
>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>>>> at
>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>>>> ... 20 more
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Michael
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>>>> Michael,
>>>>>>>>
>>>>>>>> I suspect you are seeing this error because the property is
>>>>>>>> read-only. The
>>>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>>>> Message::messageKind property in a serialization because its value
>>>>>>>> is
>>>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>>>
>>>>>>>> Kenn
>>>>>>>>
>>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>>>> Hello there,
>>>>>>>>>
>>>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>>>> which
>>>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>>>> Enteprise
>>>>>>>>> Architect), the following exception is being thrown:
>>>>>>>>>
>>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
>>>>>>>>> is not
>>>>>>>>> legal. (...)
>>>>>>>>>
>>>>>>>>> The xmi file defines the following:
>>>>>>>>> (...)
>>>>>>>>> <message xmi:type="uml:Message"
>>>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>>>> messageSort="synchCall"
>>>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>>>> (...)
>>>>>>>>>
>>>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>>>> cannot
>>>>>>>>> have the value "complete", but according to the UML specification
>>>>>>>>> (from
>>>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>>>
>>>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>>>> type
>>>>>>>>> that identifies the type of message.
>>>>>>>>> Generalizations
>>>>>>>>> None
>>>>>>>>> Description
>>>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Therefore the "complete" message kind is correct! I cannot find
>>>>>>>>> any error
>>>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>>>> like
>>>>>>>>> this:
>>>>>>>>>
>>>>>>>>> Model _model = (Model)
>>>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I
>>>>>>>>> have tried
>>>>>>>>> it with simple messages and signals being sent between the
>>>>>>>>> lifelines. The
>>>>>>>>> effect is the same. Has anybody have the same problems with
>>>>>>>>> sequence
>>>>>>>>> diagrams?
>>>>>>>>>
>>>>>>>>> I'm using:
>>>>>>>>> Eclipse 3.3.1
>>>>>>>>> EMF 2.3.1
>>>>>>>>> UML2 2.1.1
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks in advance for any suggestions,
>>>>>>>>>
>>>>>>>>> Michael Mlynarski
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: UML2 / Sequence diagram / MessageKind [message #625761 is a reply to message #476748] Wed, 19 December 2007 07:42 Go to previous message
Reinhard Jeschull is currently offline Reinhard JeschullFriend
Messages: 10
Registered: July 2009
Junior Member
I am using Enterprise Architect with EMF/UML2 too. A lot of informations
are missing in the XMI file, that is exported by EA. For example:
- Message arguments in sequence diagrams (like msg("Test", 138) )
- Covered-Attributes sometimes refer to an Class/Object/... instead of
the lifeline
- Derived attributes are included
- Wrong metamodell-classes are used (uml:Action instead of
uml:OpaqueAction, ...)
- Incorrect prefixes for some attribut values (like 'pk_out' instead of
'out')
- violate the uml metamodell (wrong structure, ...)
- ... very much more

I was very angry about that awful XMI exporter. But now, I have written
my own EAXMIConverter, that converts all the errors. I have fixed about
30 bugs in about the half of the diagram types and the elements we are
using for our models (we don't need composition associations for our
models, for example).

You can take a look at my thread with SOME bugs (not all):
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=sugge stions;action=display;num=1190806010

Kenn Hussey schrieb:
> Michael,
>
> The problem is that the XMI specification (like most) leaves room for
> interpretation in certain areas... Note, however, that serialization of
> derived properties is explicitly discouraged by the (latest) XMI
> specification...
>
> Kenn
>
> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
> news:fjneri$3md$1@build.eclipse.org...
>> Kenn,
>>
>> thanks for your advices. As I have to implement my small application for
>> analysing heterogenous uml models fast, I have modelled the sequence
>> diagram in the UML2 editor. For now it works fine.
>>
>> I think it's a little bit strange, that the Enterprise Architect (being
>> recommended directly from OMG) is generating incorrect xmi output. The
>> interchange between different uml modeling tools with xmi files seems to
>> be really complicated.
>>
>>
>> Regards,
>> Michael
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>> news:fjjlno$hpg$1@build.eclipse.org...
>>> Michael,
>>>
>>> An instance specification cannot be used as the type of a property in
>>> UML - InstanceSpecification is not a specialization of Type... I suspect
>>> these references are being discarded because they are invalid (when I
>>> tried opening the model, a number of errors appeared on the 'Problems'
>>> tab of the UML editor). I think the bug is in the tool that you are using
>>> to produce the original UML model...
>>>
>>> Kenn
>>>
>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>> news:fjh74b$udl$1@build.eclipse.org...
>>>> Hello again,
>>>>
>>>> I've found, that the automatic transformation (from *.uml2 to *.uml)
>>>> isn't correct. For example each Lifeline in my sequence diagram is
>>>> represented by a specific class (is an instance of a specific class). In
>>>> the original xmi file (*.uml2) it looks like this:
>>>>
>>>> (...)
>>>> <lifeline xmi:type="uml:Lifeline"
>>>> xmi:id="EAID_LL000000_322B_4f6d_92B1_EAEC867D8653" name="shop"
>>>> visibility="public"
>>>> represents="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/ >
>>>> </ownedBehavior>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6">
>>>> <type xmi:idref="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D">
>>>> <type xmi:idref="EAID_87577B38_10FB_4692_A8AD_1D7E967829D3"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6">
>>>> <type xmi:idref="EAID_7CD96DF7_C1DE_4bc7_AEAD_CAA654072E62"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D">
>>>> <type xmi:idref="EAID_2FBD08F4_EE88_406e_AA4D_CD915EA476D6"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328">
>>>> <type xmi:idref="EAID_730FF633_6D1E_4d6d_96FA_AB356113328F"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0">
>>>> <type xmi:idref="EAID_A8D37607_914B_413a_8366_C725EE082E00"/>
>>>> </ownedAttribute>
>>>> <ownedAttribute xmi:type="uml:Property"
>>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865">
>>>> <type xmi:idref="EAID_813A623C_322B_4f6d_92B1_EAEC867D8653"/>
>>>> </ownedAttribute>
>>>> (...)
>>>>
>>>> In the new file, which was generated with the UML2 editor, several
>>>> connections to the representant (through "xmi:type") are missing! Here
>>>> the relevant part of the *.uml file:
>>>>
>>>> (...)
>>>> </ownedBehavior>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_E475_4fdd_A45B_0AC888D8AD6"
>>>> type="EAID_9E8A8CEA_E475_4fdd_A45B_0AC888D8AD60"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_10FB_4692_A8AD_1D7E967829D"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_C1DE_4bc7_AEAD_CAA654072E6"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_EE88_406e_AA4D_CD915EA476D"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_6D1E_4d6d_96FA_AB356113328"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_914B_413a_8366_C725EE082E0"/>
>>>> <ownedAttribute
>>>> xmi:id="EAID_AT000000_000_322B_4f6d_92B1_EAEC867D865"/>
>>>> </packagedElement>
>>>> (...)
>>>>
>>>> Only the first lifeline is connected with a representant (see type="..."
>>>> attribute). Is it a possible bug in the automatic conversion from *.uml2
>>>> to *.uml in the UML2 editor?
>>>>
>>>> I've posted my models in my last post (09.12.2007, 16.40 PM).
>>>>
>>>>
>>>> Thanks in advance,
>>>> Michael
>>>>
>>>>
>>>>
>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>> news:fjcvda$io2$1@build.eclipse.org...
>>>>> Michael,
>>>>>
>>>>> A file ending with a .xmi extension and containing valid elements from
>>>>> the 'http://schema.omg.org/spec/UML/2.1' namespace should load without
>>>>> problem in the UML2 editor; the UML2 equivalent of this namespace (for
>>>>> files with a .uml extension) is
>>>>> 'http://www.eclipse.org/uml2/2.0.0/UML'. Does using this namespace
>>>>> (with a 2.0.0 instead of 1.0.0) work for you?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>> news:fjblnt$1mq$1@build.eclipse.org...
>>>>>> Hi Kenn,
>>>>>>
>>>>>> I use this namespace declaration to read my model. My Enterprise
>>>>>> Architect is generating the xmi file with the following namespace:
>>>>>> xmlns:uml="http://schema.omg.org/spec/UML/2.1". This namespace cannot
>>>>>> be read and I'm retrieving an NullPointerException. Using the
>>>>>> http://www.eclipse.org/uml2/1.0.0/UML I'm able to read several UML
>>>>>> models, but within sequence diagrams I become the
>>>>>> IllegalValueException.
>>>>>>
>>>>>> Are there any other namespaces I should use? I have used the
>>>>>> eclipse-namespace according to:
>>>>>> http://www.filigris.com/products/docflex_xml/xsddoc/examples /html/eclipse_uml2/
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>> Michael
>>>>>>
>>>>>>
>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>> news:fj92cr$4b0$1@build.eclipse.org...
>>>>>>> Michael,
>>>>>>>
>>>>>>> The format of your mode suggests that it's a UML 2.1(.x) model since
>>>>>>> it contains 'packagedElement' elements... but the namespace
>>>>>>> declaration (http://www.eclipse.org/uml2/1.0.0/UML") references the
>>>>>>> older version of UML2 which was (nearly) based on UML 2.0. The
>>>>>>> 'ownedMember' property of the Package metaclass was renamed to
>>>>>>> 'packagedElement' in UML 2.1...
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>>
>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>> news:fj62em$qud$1@build.eclipse.org...
>>>>>>>> Hello there,
>>>>>>>>
>>>>>>>> I've tried to manually delete the 'messageKind="complete"' attribute
>>>>>>>> from the XML file. Unfortunately futher exceptions are being thrown.
>>>>>>>> What am I doing wrong? I've attached my model to this e-mail.
>>>>>>>>
>>>>>>>> The exception being thrown:
>>>>>>>>
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>>> at de.mlynarski.utils.LoadUML.load(LoadUML.java:46)
>>>>>>>> at de.mlynarski.utils.LoadUML.main(LoadUML.java:74)
>>>>>>>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>>>>>>>> 'org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImp l @124111a
>>>>>>>> (name: shop, visibility: <unset>) (visibility: public)' is not
>>>>>>>> legal. (file:/c:/temp/OnlineShop_SD_noMK.uml2, -1, -1)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2524)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1087)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>>> at
>>>>>>>> org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocumen t(UMLHandler.java:54)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>>> ... 3 more
>>>>>>>> Caused by: java.lang.ArrayStoreException
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:693)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:393)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:351)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1170)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2519)
>>>>>>>> ... 20 more
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks in advance,
>>>>>>>> Michael
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> schrieb im Newsbeitrag
>>>>>>>> news:fj44ki$u1k$1@build.eclipse.org...
>>>>>>>>> Michael,
>>>>>>>>>
>>>>>>>>> I suspect you are seeing this error because the property is
>>>>>>>>> read-only. The
>>>>>>>>> UML2 resource implementation doesn't expect to see values for the
>>>>>>>>> Message::messageKind property in a serialization because its value
>>>>>>>>> is
>>>>>>>>> derived based on the presence/absence of send/receive events.
>>>>>>>>>
>>>>>>>>> Kenn
>>>>>>>>>
>>>>>>>>> "Michael Mlynarski" <michael@mlynarski.info> wrote in message
>>>>>>>>> news:bda89a43d77916bc239e28f33b20e02f$1@www.eclipse.org...
>>>>>>>>>> Hello there,
>>>>>>>>>>
>>>>>>>>>> I have discovered the following problem: While reading an xmi file
>>>>>>>>>> which
>>>>>>>>>> contains a UML sequence diagram model (created and exported with
>>>>>>>>>> Enteprise
>>>>>>>>>> Architect), the following exception is being thrown:
>>>>>>>>>>
>>>>>>>>>> org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'complete'
>>>>>>>>>> is not
>>>>>>>>>> legal. (...)
>>>>>>>>>>
>>>>>>>>>> The xmi file defines the following:
>>>>>>>>>> (...)
>>>>>>>>>> <message xmi:type="uml:Message"
>>>>>>>>>> xmi:id="EAID_B1BE45F9_D0B9_4d19_BA6B_476FE160FAD3"
>>>>>>>>>> name="loginCustomer(char)" messageKind="complete"
>>>>>>>>>> messageSort="synchCall"
>>>>>>>>>> sendEvent="EAID_FR000000_E475_4fdd_A45B_0AC888D8AD60"
>>>>>>>>>> receiveEvent="EAID_FR000000_322B_4f6d_92B1_EAEC867D8653"
>>>>>>>>>> signature="EAID_F04E57C4_DB59_4847_855F_7790E51047DA"/>
>>>>>>>>>> (...)
>>>>>>>>>>
>>>>>>>>>> According to the description of the exception, the "messageKind"
>>>>>>>>>> cannot
>>>>>>>>>> have the value "complete", but according to the UML specification
>>>>>>>>>> (from
>>>>>>>>>> http://www.omg.org/docs/formal/07-02-03.pdf):
>>>>>>>>>>
>>>>>>>>>> 14.3.22 MessageKind (from BasicInteractions) This is an enumerated
>>>>>>>>>> type
>>>>>>>>>> that identifies the type of message.
>>>>>>>>>> Generalizations
>>>>>>>>>> None
>>>>>>>>>> Description
>>>>>>>>>> MessageKind is an enumeration of the following values:
>>>>>>>>>> . complete = sendEvent and receiveEvent are present.
>>>>>>>>>> . lost = sendEvent present and receiveEvent absent.
>>>>>>>>>> . found = sendEvent absent and receiveEvent present.
>>>>>>>>>> . unknown = sendEvent and receiveEvent absent (should not appear).
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Therefore the "complete" message kind is correct! I cannot find
>>>>>>>>>> any error
>>>>>>>>>> in my code, while I'm simply reading the whole model from the xmi
>>>>>>>>>> like
>>>>>>>>>> this:
>>>>>>>>>>
>>>>>>>>>> Model _model = (Model)
>>>>>>>>>> EcoreUtil.getObjectByType(resource.getContents(),
>>>>>>>>>> UMLPackage.Literals.MODEL);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Is it a possible bug in the underlying EMF Metamodel for UML? I
>>>>>>>>>> have tried
>>>>>>>>>> it with simple messages and signals being sent between the
>>>>>>>>>> lifelines. The
>>>>>>>>>> effect is the same. Has anybody have the same problems with
>>>>>>>>>> sequence
>>>>>>>>>> diagrams?
>>>>>>>>>>
>>>>>>>>>> I'm using:
>>>>>>>>>> Eclipse 3.3.1
>>>>>>>>>> EMF 2.3.1
>>>>>>>>>> UML2 2.1.1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks in advance for any suggestions,
>>>>>>>>>>
>>>>>>>>>> Michael Mlynarski
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
Previous Topic:how to generate EMF from UML.ecore
Next Topic:inStructuredNode reference not saved
Goto Forum:
  


Current Time: Tue Aug 09 13:00:58 GMT 2022

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

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

Back to the top