MDR use problem
sam adam <[email protected]> Fri, 21 May 2004 20:19:20 +0200 (CEST)
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
--0-650902860-1085163560=:54944
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi all,
I have downloaded the MDR-standalone and copied the example Projects metadata. When I compiled and run the ProjectCreationDemo (as it is), I got the message: [Exception in thread "main" java.lang.NullPointerException ] returned by the getExtent method. I have noticed the files mdr.btd, mdr.btb and mdr.btx were though created.
I have then tried to test on the nullity of the extent and I tried to use the createExtent method as follows:
[ if (extent==null)
extent= (ProjectsPackage) repository.createExtent("Projects metadata"); ]
but I got the error message [unreported exception org.netbeans.api.mdr.CreationFailedException; must be caught or declared to be thrown
extent= (ProjectsPackage) repository.createExtent("Projects metadata");]
I tried to run the ProjectRetrievalDemo (as the mdr files were created) but I got the following error message after. Any help would be appreciated. Thanks in advance.
-----------------------------------------------------------------------------------------------------
[org.netbeans.mdr.Logger] Property org.netbeans.mdr.persistence.btreeimpl.filename not specified. Us
ing default value: mdr
[org.netbeans.mdr.Logger] INFORMATIONAL *********** Exception occurred ************ at Fri May 21 17
:21:15 GMT 2004
org.netbeans.mdr.persistence.StorageBadRequestException: There is no value for key "storageIds:mdr"
at org.netbeans.mdr.persistence.btreeimpl.btreestorage.NameIndex.getObj(NameIndex.java:56)
at org.netbeans.mdr.persistence.btreeimpl.btreestorage.MofidIndex.get(MofidIndex.java:44)
at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.fetchIndex(BtreeDatabas
e.java:815)
at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.getIndex(BtreeStorage.ja
va:251)
at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.getSinglevaluedIndex(Btr
eeStorage.java:259)
at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.open(BtreeStorage.java:1
62)
at org.netbeans.mdr.storagemodel.MdrStorage.init(MdrStorage.java:422)
at org.netbeans.mdr.storagemodel.MdrStorage.init(MdrStorage.java:378)
at org.netbeans.mdr.NBMDRepositoryImpl.initCheck(NBMDRepositoryImpl.java:635)
at org.netbeans.mdr.NBMDRepositoryImpl.getExtent(NBMDRepositoryImpl.java:267)
at org.netbeans.mdrdemo.ProjectRetrievalDemo.main(ProjectRetrievalDemo.java:15)
Exception in thread "main" java.lang.NullPointerException
at org.netbeans.mdrdemo.ProjectRetrievalDemo.main(ProjectRetrievalDemo.java:18)
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
--0-650902860-1085163560=:54944
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">Hi all,</FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">I have downloaded the MDR-standalone and copied the example Projects metadata. When I compiled and run the ProjectCreationDemo (as it is), I got the message: <SPAN style="mso-spacerun: yes"> </SPAN>[Exception in thread "main" java.lang.NullPointerException ] returned by the getExtent method. I have noticed the files mdr.btd, mdr.btb and mdr.btx were though created. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">I have then tried to test on the nullity of the extent and I tried to use the createExtent method as follows: <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">[ if (extent==null)<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN>extent= (ProjectsPackage) repository.createExtent("Projects metadata"); ]<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">but I got the error message [unreported exception org.netbeans.api.mdr.CreationFailedException; must be caught or declared to be thrown<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>extent= (ProjectsPackage) repository.createExtent("Projects metadata");]<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">I tried to run the ProjectRetrievalDemo (as the mdr files were created) but I got the following error message after. Any help would be appreciated. Thanks in advance.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">-----------------------------------------------------------------------------------------------------<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">[org.netbeans.mdr.Logger] Property org.netbeans.mdr.persistence.btreeimpl.filename not specified. Us<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">ing default value: mdr<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">[org.netbeans.mdr.Logger] INFORMATIONAL *********** Exception occurred ************ at Fri May 21 17<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">:21:15 GMT 2004<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">org.netbeans.mdr.persistence.StorageBadRequestException: There is no value for key "storageIds:mdr"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.persistence.btreeimpl.btreestorage.NameIndex.getObj(NameIndex.java:56)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.persistence.btreeimpl.btreestorage.MofidIndex.get(MofidIndex.java:44)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.fetchIndex(BtreeDatabas<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">e.java:815)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.getIndex(BtreeStorage.ja<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">va:251)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.getSinglevaluedIndex(Btr<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">eeStorage.java:259)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.open(BtreeStorage.java:1<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">62)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.storagemodel.MdrStorage.init(MdrStorage.java:422)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.storagemodel.MdrStorage.init(MdrStorage.java:378)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.NBMDRepositoryImpl.initCheck(NBMDRepositoryImpl.java:635)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdr.NBMDRepositoryImpl.getExtent(NBMDRepositoryImpl.java:267)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdrdemo.ProjectRetrievalDemo.main(ProjectRetrievalDemo.java:15)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">Exception in thread "main" java.lang.NullPointerException<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>at org.netbeans.mdrdemo.ProjectRetrievalDemo.main(ProjectRetrievalDemo.java:18)<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P></DIV><p>
Dialoguez en direct avec vos amis grâce à <a href="http://fr.rd.yahoo.com/messenger/mail_taglines/yahoofr/*http://fr.messenger.yahoo.com/downloadactivex/index.html" target="_blank">Yahoo! Messenger !</a>
--0-650902860-1085163560=:54944--