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 26941 - Bug in XmiWriter? - Attribute of Ordered StructureTypes
Summary: Bug in XmiWriter? - Attribute of Ordered StructureTypes
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-01 18:46 UTC by Jens Fransson
Modified: 2002-09-02 17:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Fransson 2002-09-01 18:46:46 UTC
Hi Daniel!

Lately we started to use StructureTypes 
(javax.jmi.model.StructureType). In a special case, there 
seems to be a problem with these in MDR. The following 
Example on M2 Level (in hopefully understandable UML 
pseudocode) seems not to work with MDR:

Class GraphEdge {
	+waypoints {ordered} [2..*]: BezierPoint
}

StructureType BezierPoint {
	+base: Point
	+control1: Point
	+control2: Point
}

StructureType Point { 
	+x: double
	+y: double 
}

It seems not to be possible to write an Instance (M1 
Level) of GraphEdge with XmiWriter.
When I try to save a Model with an Instance of GraphEdge, 
I get the following error:

[...]
XMI writer started
[19:16:24 Error] javax.jmi.reflect.InvalidCallException
Exception type: javax.jmi.reflect.InvalidCallException
javax.jmi.reflect.InvalidCallException
	at 
org.netbeans.mdr.handlers.InstanceHandler.refGetValue
(InstanceHandler.java:372)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writeReference
(XMIWriterImpl.java:825)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writeInstance
(XMIWriterImpl.java:663)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writeReference
(XMIWriterImpl.java:858)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writeInstance
(XMIWriterImpl.java:663)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writePackage
(XMIWriterImpl.java:590)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writePackage
(XMIWriterImpl.java:598)
	at 
org.netbeans.lib.jmi.xmi.XMIWriterImpl.writeDocument
(XMIWriterImpl.java:545)
	at org.netbeans.lib.jmi.xmi.XMIWriterImpl.write
(XMIWriterImpl.java:133)
	at org.netbeans.lib.jmi.xmi.XMIWriterImpl.write
(XMIWriterImpl.java:176)
	at 
jboogie.app.test.mdr.ditest.MdrUtil.writeModelToXmi
(MdrUtil.java:57)
[...]

Maybe MDR does not support an {ordered} Attribute with 
Multiplicity [2..*] of a StructureType?

Regards,
Jens
Comment 1 Daniel Prusa 2002-09-02 17:42:35 UTC
Exception caused by an error in the metamodel.