Re: CompositionViolationException
Stefan Ocke <[email protected]> Mon, 29 Mar 2004 15:49:02 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, it looks like you are experimenting with the UML 2.0 metamodel... How are you trying to handle the association redefinitions (this is not supported by MOF1.4) ? The composition you are talking about redefines the composition in the package Ownership... Without proper support for association redefinition you probably run into this error... Best Regards, Stefan. > Hi, > > when I tried to setNamespace() for the second model element, following > execption messages always come to me: > > javax.jmi.reflect.CompositionViolationException > at > org.netbeans.mdr.storagemodel.StorableObject.setComposite(StorableObject.java:251) > at > org.netbeans.mdr.storagemodel.StorableObject.setComposite(StorableObject.java:233) > at > org.netbeans.mdr.storagemodel.AssocEndIndexSet.add(AssocEndIndexSet.java:148) > at > org.netbeans.mdr.storagemodel.StorableAssociation.addLink(StorableAssociation.java:371) > at > org.netbeans.mdr.handlers.AssociationHandler._handleLocalAdd(AssociationHandler.java:155) > at > org.netbeans.mdr.handlers.AssociationHandler._handleAdd(AssociationHandler.java:144) > at > org.omg.library.infrastructurelibrary.core.abstractions.namespaces.AOwnedMemberNamespace$Impl.add(Unknown > Source) > at > org.omg.library.infrastructurelibrary.core.abstractions.namespaces.AOwnedMemberNamespace$Impl._add(Unknown > Source) > at > org.netbeans.mdr.handlers.InstanceHandler._handleSetR(InstanceHandler.java:166) > at > org.omg.library.uml2.classes.kernel.Class1$Impl.setNamespace(Unknown > Source) > > I know "CompositionViolationException" indicates that an instance object is > going to become owned by more than one element (in sense of aggregation > semantics). But I cannot find the exact problem when I examine my metamodel. > > > Regards > > Fu, Bin > > > > > >