RE: [mdr-users] Borland Together, CWM, UML2MOF

"Pete Rivett" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
The following fragment is wrong:

491                 <UML:StructuralFeature.type>
   492                  <UML:Classifier>
   493                   <UML:Namespace.ownedElement>
   494                    <UML:DataType xmi.idref = 'G.42'/>
   495                   </UML:Namespace.ownedElement>
   496                  </UML:Classifier>
   497                 </UML:StructuralFeature.type>

The <UML:Namespace.ownedElement> element is invalid XMI.
The fragment should be:

491                 <UML:StructuralFeature.type>
   492                  <UML:Classifier>
   494                    <UML:DataType xmi.idref = 'G.42'/>
   496                  </UML:Classifier>
   497                 </UML:StructuralFeature.type>


Cheers
Pete


Pete Rivett (mailto:[email protected]) 
CTO, Adaptive Inc. 
Dean Park House, 8-10 Dean Park Crescent, Bournemouth, BH1 1HL, UK 
Tel:  +44 (0)1202 449419 Fax: +44 (0)1202 449448 
http://www.adaptive.com 


 

> -----Original Message-----
> From: Mike Martin [mailto:[email protected]] 
> Sent: Friday, April 22, 2005 8:15 PM
> To: [email protected]
> Subject: [mdr-users] Borland Together, CWM, UML2MOF
> 
> We're evaluating Borland's Together as a UML modeling tool 
> for creating
> a metamodel extended from certain CWM packages.  To test this I first
> tried
> loading the CWM 1.0 source (in its .MDL Rose form) into Together,
> exporting
> it all to XMI, then running UML2MOF.  I get the following 
> exception from
> UML2MOF:
> 
> org.netbeans.lib.jmi.util.DebugException: Cannot set a 
> multi-value to a
> non-multivalued reference:type
>         at
> org.netbeans.lib.jmi.xmi.XmiElement$Instance.setReferenceValue
> s(XmiEleme
> nt.java:699)
>         at
> org.netbeans.lib.jmi.xmi.XmiElement$Instance.receiveValue(XmiE
> lement.jav
> a:723)
>         at
> org.netbeans.lib.jmi.xmi.XmiElement$ObjectValues.endElement(Xm
> iElement.j
> ava:1470)
>         at
> org.netbeans.lib.jmi.xmi.XmiSAXReader.endElement(XmiSAXReader.
> java:258)
>         at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1720)
>         at 
> org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
>         at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
>         at 
> org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
>         at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
> ... (previous 2 repeated 13 more times)
>         at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
>         at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
>         at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
>         at
> org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:136)
>         at
> org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:107)
>         at
> org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImp
> l.java:58)
>         at
> org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImp
> l.java:51)
>         at org.netbeans.lib.jmi.uml2mof.Main.main(Main.java:56)
> [org.netbeans.lib.jmi.Logger] XMI parsing error at line: 497: 
> Cannot set
> a multi-value to a non-multivalued reference:type
> *********** Exception occurred ************ at Fri Apr 22 11:26:11 CDT
> 2005
> javax.jmi.xmi.MalformedXMIException:
> org.netbeans.lib.jmi.util.DebugException: Cannot set a 
> multi-value to a
> non-multivalued reference:type
>         at
> org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImp
> l.java:64)
>         at
> org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImp
> l.java:51)
>         at org.netbeans.lib.jmi.uml2mof.Main.main(Main.java:56)
> ANNOTATIONS:
> [null] Exception occurred:
> 
> Export was done by selecting 'XMI 1.1 for UML 1.4 (OMG)'.  
> Here's what I
> think
> are the relevant portions.
> 
>      1  <?xml version = '1.0' encoding = 'ISO8859_1' ?>
>      2  <XMI xmi.version = '1.1' xmlns:UML = '//org.omg/UML/1.3'>
>      3   <XMI.header>
>      4    <XMI.documentation>
>      5     <XMI.exporter>
>      6          TogetherSoft
>      7     </XMI.exporter>
>      8     <XMI.exporterVersion>
>      9          6.0
>     10     </XMI.exporterVersion>
>     11    </XMI.documentation>
>     12    <XMI.metamodel xmi.name = 'UML' xmi.version = '1.4'/>
>     13   </XMI.header>
>     14   <XMI.content>
>     15    <UML:Model xmi.id = 'S.1' name = 'Project' visibility =
> 'public'>
> ...
>    477              <UML:Class xmi.id = 'S.26'
>    478                    name = 'VocabularyElement' visibility =
> 'public' isSpecification = 'false'
>    479                    isAbstract = 'false' isActive = 'false'>
>    480               <UML:Classifier.feature>
>    481                <UML:Attribute xmi.id = 'S.37'
>    482                      name = 'definition' visibility = 'public'
> isSpecification = 'false'
>    483                      changeability = 'changeable' ownerScope =
> 'instance' type = 'G.42'>
>    484                 <UML:StructuralFeature.multiplicity>
>    485                  <UML:Multiplicity>
>    486                   <UML:Multiplicity.range>
>    487                    <UML:MultiplicityRange lower = '1' upper =
> '1'/>
>    488                   </UML:Multiplicity.range>
>    489                  </UML:Multiplicity>
>    490                 </UML:StructuralFeature.multiplicity>
>    491                 <UML:StructuralFeature.type>
>    492                  <UML:Classifier>
>    493                   <UML:Namespace.ownedElement>
>    494                    <UML:DataType xmi.idref = 'G.42'/>
>    495                   </UML:Namespace.ownedElement>
>    496                  </UML:Classifier>
>    497                 </UML:StructuralFeature.type>
> ...
>  39452      <UML:DataType xmi.id = 'G.42'
>  39453            name = 'String' visibility = 'public' 
> isSpecification
> = 'false'/>
> 
> Any ideas?  I'm relatively new to MDR/XMI, but this seems 
> like it's just
> saying
> that the type of VocabularyElement.definition is String, which seems
> plausible
> enough.  Or is there something else about this XMI that 
> Together didn't
> generate
> correctly?
> 
> Mike
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.