Re: [mdr-users] XMI reading fine, but empty result collection

SainTiss <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi,

The solution was quite stupid: I downloaded other MDR jars, and things appear to be fixed.
I did some tests, and it turns out to be jmiutils.jar. The bad one was dated 2004-08-26. The odd thing is that this very jar is used e.g. by AndroMDA, and there don't seem to be any MDR problems there...

Any idea as to what might have been wrong in this jar?

Thanks,

Hans

On Thu, 26 May 2005 19:05:17 +0200
SainTiss <[email protected]> wrote:

> Actually, I've just written this code, so it's never worked in the current 
> project. It's code which is launched from maven, but I don't think that could 
> be a problem, right?
> 
> Thanks,
> 
> Hans
> 
> On Thursday 26 May 2005 18:46, Martin Matula wrote:
> > Well, that's weird. When did this start to happen?
> > Martin
> >
> > SainTiss wrote:
> > >Hi,
> > >
> > >I'm having a strange problem here. I'm just trying to load the UML 1.4
> > > metamodel into MDR, and although the XMI reading seems to succeed (no
> > > error), the resulting collection is empty:
> > >
> > > MDRepository repo = MDRManager.getDefault().getDefaultRepository();
> > >      repo.beginTrans(true);
> > >      RefPackage mmHandle = repo.createExtent("testMM");
> > >
> > >      XMIReader reader = XMIReaderFactory.getDefault().createXMIReader();
> > >      java.util.Collection col =
> > > reader.read("jar:file:/usr/local/andromda-bin-3.0-RC1-SNAPSHOT/lib/jmi/ja
> > >rs/jmiuml-1.4di.jar!/M2_DiagramInterchangeModel.xml", mmHandle);
> > >      System.out.println(col.size());
> > >
> > >This outputs '0'.
> > >
> > >As logging output, I get the following:
> > >
> > >[org.netbeans.mdr.Logger] Storage factory:
> > > org.netbeans.mdr.persistence.memoryimpl.StorageFactoryImpl
> > > [org.netbeans.mdr.Logger] initializing...
> > >[org.netbeans.mdr.Logger] Rebooting storage. Reason:
> > > org.netbeans.mdr.util.DebugException: Missing storage files or different
> > > storage version. [org.netbeans.mdr.Logger] booting...
> > >[org.netbeans.mdr.Logger] Booting repository ...
> > >[org.netbeans.mdr.Logger] Creating boot MOF metamodel ...
> > >[org.netbeans.mdr.Logger] Installing pure MOF Metamodel ...
> > >[org.netbeans.mdr.Logger] Parsing MOF model to DOM represtentation ....
> > >[org.netbeans.mdr.Logger] new package: .:000000000000015B, metapackage:
> > > .:0000000000000030 [org.netbeans.lib.jmi.Logger] XMI reader started
> > >[org.netbeans.lib.jmi.Logger] Number of created instances: 307
> > >[org.netbeans.lib.jmi.Logger] finished, TIME: 3.425[s]
> > >[org.netbeans.mdr.Logger] new package: .:00000000000002B5, metapackage:
> > > .:00000000000002A9 [org.netbeans.lib.jmi.Logger] XMI reader started
> > >[org.netbeans.lib.jmi.Logger] Number of created instances: 952
> > >[org.netbeans.lib.jmi.Logger] finished, TIME: 4.433[s]
> > >
> > >So you'd think everything is loaded all right...
> > >
> > >Maybe the storage version exception means something?
> > >
> > >Thanks,
> > >
> > >Hans
> 
> -- 
> Ark Linux - Linux for the Masses (http://arklinux.org)
> 
> If we cannot live so as to be happy, let us at least live so as to deserve it
>  -- Immanuel Hermann Fichte
> 
> Capitalism: 
> You don't have any cows. The bank will not lend you money to buy cows, 
> because you don't have any cows to put up as collateral.
> 
> Representative Democracy:
> You have two cows. Your neighbors pick someone to tell you who gets the milk. 
> 
> In a world without walls and fences, who needs windows and gates?
> 
> I'm a fool. Therefore I'm not.
> 
> Hans Schippers
> Aspirant FWO - Vlaanderen
> Formal Techniques in Software Engineering (FoTS)
> University of Antwerp
> Middelheimlaan 1
> 2020 Antwerpen - Belgium
> Phone: +32 3 265 38 71
> Fax: +32 3 265 37 77
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.