Re: RE : [mdr-dev] Getting a null pointer exception while commiting

Martin Matula <[email protected]> Thu, 04 Sep 2003 10:16:37 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
So what do you expect me to do? Isn't it now up to you to fix those 
problems?
Martin

Olivier RICHAUD wrote:
> Hi Martin,
> 
> In fact, the model is converted from a XMI/UML model to XMI/MOF using
> and imported into MDR. I have importing the problem, and in fact you are
> pointing a bug in the XML database I'm using to store XMI files.
> 
> Even stranger, some XMI.field contain a boolean value (true or false).
> One of them is corrupted.
> 
> I have attached a ZIP archive which contain two XML files:
> 	- Model_RTM.xml, the original file
> 	- Stored_RTM.xml, the content returned by eXist 0.9.2
> 
> Regards.
> 
> Olivier.
> 
> -----Message d'origine-----
> De : Martin Matula [mailto:[email protected]] 
> Envoyé : mercredi 3 septembre 2003 23:52
> À : [email protected]
> Objet : Re: [mdr-dev] Getting a null pointer exception while commiting
> 
> 
> Hi Olivier,
> it is strange that you are able to read the attached model. When I tried
> 
> to import it, XMI reader complained about the format of the XMI file 
> (empty <XMI.field> tags are not supported - you have them in the 
> multiplicity). After I replaced all <XMI.field/> by 
> <XMI.field>1</XMI.field>, I successfully imported the metamodel and 
> instantiated it without any exception.
> Regards,
> Martin
> 
> Olivier RICHAUD wrote:
> 
>>I'm trying to instanciate the model (see attachment) and when I commit
> 
> 
>>the surrounding Read/Write transaction, I get the following exception:
>>
>>org.netbeans.mdr.persistence.StorageTransientDataException:
>>java.lang.NullPointerException: null
>>        at 
>>org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.writ
>>eS
>>treamable(BtreeDatabase.java:877)
>>        at
>>
> 
> org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.addRec
> 
>>ord(BtreeDatabase.java:916)
>>        at
>>
> 
> org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.save(B
> 
>>treeDatabase.java:502)
>>        at
>>
> 
> org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.commit
> 
>>Changes(BtreeDatabase.java:418)
>>        at
>>
> 
> org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.commitC
> 
>>hanges(BtreeStorage.java:313)
>>        at
>>org.netbeans.mdr.storagemodel.MdrStorage.save(MdrStorage.java:532)
>>        at
>>org.netbeans.mdr.storagemodel.MdrStorage.commit(MdrStorage.java:503)
>>        at
>>
> 
> org.netbeans.mdr.util.TransactionMutex.leave(TransactionMutex.java:183)
> 
>>        at
>>
> 
> org.netbeans.mdr.NBMDRepositoryImpl.endTrans(NBMDRepositoryImpl.java:202
> 
>>)
>>        ...
>>
>>
>>
>>When importing my model, I perform some checks to ensure the model can
> 
> 
>>be correctly instantiated.
>>
>>Before committing, I dont't have any problem creating  a new extent. I
> 
> 
>>can see a valid MOF ID for my nex extent. But as soon as I commit, 
>>this exception is raised and, of course, when I try to find the 
>>extent, a null reference is returned, indicating no such extent exist.
>>
>>Nevertheless, this may be linked to my model because I can correctly 
>>instanciate another model. But I don't understand.
>>
>>The MDR build number is : 200307311024 (MDR Standalone).
>> 
>>Thanks for your help.
>>
>>Regards.
>>
>>Olivier.
> 
>