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.
Hi Jeff, this exception is thrown by writer because in order for the XMI file to be generated correctly, the metamodel should contain information saying what URI should be used when declaring namespaces from your metamodel in the generated XMI document. XMI 1.2 was lacking this capability, thus an arbitrary URI is used there. For XMI 2.0 the writer is trying to use the correct URI and it expects it to be specified in the metamodel using a speciat tag defined in the XMI 2.0 specification. The tag is of course not there, because the model was read from XMI 1.2. Anyway, I think that the behavior of XMI 2.0 writer is too strict and we should relax this constraint (the tag should not be mandatory), so I see this as a bug in the XMI Writer. It would be good if you could file a new issue for this and someone will look at it next week (hopefuly on Monday). Thanks, Martin jeff_cahoon wrote: > I was hoping to produce some XML Schmea for my model using: > > mdr/src/org/netbeans/lib/jmi/xmi/SchemaProducer > > I think it requires XMI version 2.0. > > My model was loaded using XMI 1.2 from Poseidon, so I tried > to alter MDR so that its "Export XMI" utility would generate XMI 2.0. > I changed: > mdr/src/org/netbeans/lib/jmi/xmi/DelegatingWriter. java > so that it would only use XMI20Writer. > I did the same thing with : > mdr/src/org/netbeans/lib/jmi/xmi/Producer.java > > However, I got the following error. > > Annotation: Exception occurred in Request Processor > org.netbeans.lib.jmi.util.DebugException: A tag defining namespace uri > not found, package Model > at org.netbeans.lib.jmi.xmi.XMI20Writer.findNamespace s(XMI20Writer.java:76) > at org.netbeans.lib.jmi.xmi.WriterBase.write (WriterBase.java:270) > at org.netbeans.lib.jmi.xmi.WriterBase.write (WriterBase.java:201) > at > org.netbeans.lib.jmi.xmi.DelegatingWriter.write (DelegatingWriter.java:43) > at org.netbeans.api.xmi.XMIWriter.write (XMIWriter.java:88) > at org.netbeans.lib.jmi.xmi.XMIWriterImpl.write (XMIWriterImpl.java:45) > at > org.netbeans.modules.mdrexplorer.looks.reflect.act ions.SaveXMIAction$1.run(SaveXMIAction.java:95) > at org.openide.util.Task.run(Task.java:136) > at org.openide.util.RequestProcessor$Task.run (RequestProcessor.java:330) > [catch] at > org.openide.util.RequestProcessor$Processor.run (RequestProcessor.java:677) > > I am beginning to think that I may have been expecting too much from MDR. > Maybe it is not possible to load an XMI 1.2 model and export XMI 2.0. > > Is there another way? > > Thanks, > Jeff
*** Issue 36808 has been marked as a duplicate of this issue. ***
Dan, please look at this issue.
Fixed. /cvs/mdr/jmiutils/src/org/netbeans/lib/jmi/xmi/XMI20Writer.java,v <-- XMI20Writer.java new revision: 1.2; previous revision: 1.1