This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 24621 - Modelling CORBA Sequences
Summary: Modelling CORBA Sequences
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-11 08:05 UTC by Mark McKinlay
Modified: 2002-08-08 15:34 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark McKinlay 2002-06-11 08:05:03 UTC
I am using the Unisys MOF plugin for Rose to model a 
datatype element
defined as a CORBA sequence, i.e.

typedef sequence<string> SortRefList;

This successfully produces the following XMI fragment in 
the meta-model.

    <!-- ==================== APML.SortRefList    
[DataType]
==================== -->
    <Model:DataType xmi.id = 'a3CFD58EA03C8'
      name = 'SortRefList' annotation = ''
      isRoot = 'true' isLeaf = 'true' isAbstract = 'false' 
visibility =
'public_vis' >
      <Model:DataType.typeCode>
        <XMI.CorbaTypeCode>
          <XMI.CorbaTcSequence xmi.tcLength = '0'>
          <XMI.CorbaTypeCode>
            <XMI.CorbaTcString xmi.tcLength = '0'/>
          </XMI.CorbaTypeCode>
          </XMI.CorbaTcSequence>
        </XMI.CorbaTypeCode>
      </Model:DataType.typeCode>
    </Model:DataType>

However, when attempting to generate the JMI interfaces 
using this sequence,
the following exception is thrown when attempting to 
create an MDR extent
using the XMIReader.

     [java] XMI reader started
     [java] org.netbeans.lib.jmi.util.DebugException: 
Unsupported Corba
type: XMI.CorbaTcSequence
     [java]     at
org.apache.crimson.parser.Parser2.parseInternal
(Parser2.java:524)
     [java]     at org.apache.crimson.parser.Parser2.parse
(Parser2.java:305)
     [java]     at
org.apache.crimson.parser.XMLReaderImpl.parse
(XMLReaderImpl.java:433)
     [java]     at javax.xml.parsers.SAXParser.parse
(SAXParser.java:357)
     [java]     at
org.netbeans.lib.jmi.xmi.XmiSAXReader.read
(XmiSAXReader.java:99)
     [java]     at
org.netbeans.lib.jmi.xmi.XmiSAXReader.read
(XmiSAXReader.java:80)
     [java]     at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read
(XMISaxReaderImpl.java:67)
     [java]     at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read
(XMISaxReaderImpl.java:49)
     [java]     at net.agentis.util.mdr.XmiToJmi.main
(XmiToJmi.java:57)
     [java] javax.jmi.xmi.MalformedXMIException:
org.netbeans.lib.jmi.util.DebugException: Unsupported 
Corba type:
XMI.CorbaTcSequence
     [java]     at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read
(XMISaxReaderImpl.java:73)
     [java]     at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read
(XMISaxReaderImpl.java:49)
     [java]     at net.agentis.util.mdr.XmiToJmi.main
(XmiToJmi.java:57)
     [java] Exception in thread "main"

BUILD FAILED

As such a definition does not violate any of the 
preconditions specified in
the "Preconditions for Java Interface Generation" in the 
JMI Specification
document, I guess I would have expected a JMI Interface to 
implement this
datatype as a java.lang.String[] as it would in CORBA.

Is this a current limitation for XMIReader?
Comment 1 Martin Matula 2002-06-12 09:56:54 UTC
This is correct, because JMI is mapping for MOF 1.4, not 
MOF 1.3. Our XMI Reader can do only straightforward 
transitions between old MOF 1.3 types to MOF 1.4 types. We 
can extend it later to be able to make also this kind of 
non-trivial mappings. This is not a defect but rather an 
enhancement request.
Comment 2 Martin Matula 2002-08-08 15:34:08 UTC
see above explanation