[mdr-users] RE : [mdr-users] Restoring data from XMI
"Olivier RICHAUD" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <002501c53c0a$6cb296b0$6564a8c0@lauris> |
Can you elaborate more on this? I dont't understand what you meand by nested packages. I read the MOF1.4 specification, It isn't clear at all for me. What suprised me is that I could work, create instances commit transactions. I could even start and restart MDR several times. I managed to save extents. But reloading XMI is an issue. Can you tell me what could be a solution? Regards. Olivier. -----Message d'origine----- De : Martin Matula [mailto:[email protected]] Envoyé : jeudi 7 avril 2005 10:34 À : [email protected] Objet : Re: [mdr-users] Restoring data from XMI Olivier, clustering is not supported for nested packages. From your description it seems that your MoodGraphable package is nested. Regards, Martin Olivier RICHAUD wrote: >Hi Martin, > >I have a problem I've never had when restoring instances of object from >XMI. When I restore my system, here are the steps I follow : 1. I >restore all my models from their corresponding XMI files. I create an >extent - calling createExtent("name", null, null) - and use an XMI >reader to load data into the extent. 2. For each set of objects, I get >the top level package of the corresponding model and pass it to >createExtent - calling createExtent("name", topLevelPackage, null) and >of course, reload with an XmiReader the objects. > >This worked fine without clustered. Now, we use clustered packages, as >you explained how to use them. We can : 1. load a model (see >STBPM_1_7.xmi) and dynamically cluster package mood.diagrams so that we >can make some of our class inherits from mood.diagrams.MoodGraphable. >2. Of course, we can create instacnes of objects which classes are >described into mood.diagrams. >3. We are able to backup our model and our space of objects into XMI >files (those which are attached). You can notice that since our classes >inherits from MoodGraphable which has a representations association, the >XMI contains links (see tag >mood.diagrams.MoodGraphable.representations). > >In order to use clustering, we have added import directives and we pass >a RefPackage array to createExtent (for both creating the model and the >space) which contains a RefPackage (the extent of model containing the >clustered package). The model is correctly restored. > >Now the problem is with restoring data : we can't restore data from >STBPM2004.xmi. I get the following exception : > >22:07:42,223 ERROR [STDERR] org.netbeans.lib.jmi.util.DebugException: >Element name cannot be resolved, unknown package: >mood.diagrams.MoodGraphable.representations >22:07:42,223 ERROR [STDERR] at >org.netbeans.lib.jmi.xmi.XmiContext.resolveElementName(XmiContext.java: >5 >27) >22:07:42,223 ERROR [STDERR] at >org.netbeans.lib.jmi.xmi.XmiElement$Instance.startSubElement(XmiElement . >java:502) >22:07:42,223 ERROR [STDERR] at >org.netbeans.lib.jmi.xmi.XmiSAXReader.startElement(XmiSAXReader.java:21 9 >) >22:07:42,223 ERROR [STDERR] at >org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXPar s >er.java:434) >22:07:42,223 ERROR [STDERR] at >org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBind e >r.java:571) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator . >java:796) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement( X >MLDocumentFragmentScannerImpl.java:752) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi s >patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD o >cumentFragmentScannerImpl.java:333) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardPar s >erConfiguration.java:529) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardPar s >erConfiguration.java:585) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147) >22:07:42,233 ERROR [STDERR] at >org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav a >:1148) >22:07:42,233 ERROR [STDERR] at >javax.xml.parsers.SAXParser.parse(Unknown Source) >22:07:42,233 ERROR [STDERR] at >org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:136) >22:07:42,233 ERROR [STDERR] at >org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:98) >22:07:42,233 ERROR [STDERR] at >org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImpl.java:37 ) > > > >Sure, I have missed something, but what? > >Thanks for your help. > >Olivier. >