Jump to content
McObject Forums

Search the Community

Showing results for tags 'error after reset'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • McObject Embedded Databases
    • Perst
  • Root2

Blogs

  • Steven Graves' Blog

Calendars

  • Community Calendar

Found 1 result

  1. how to reset correctly

    Hy, I am trying to evaluate the peformance of perstdb for our specific project. Therefore I try to use a method for insert ten times. First iteration is okay, then reset and in second iteration I got an error. FATAL EXCEPTION: IntentService[MessService] Process: de.gerding.dbcompare, PID: 4755 java.util.NoSuchElementException at org.garret.perst.impl.Btree$BtreeSelectionIterator.next(Btree.java:984) at com.example.perstmanager.PerstDataManager.getFahrtDatabyName(PerstDataManager.java:289) at com.example.perstmanager.PerstDataManager.insertDataInFahrt(PerstDataManager.java:95) First the whole method: private FahrtData getFahrtDatabyName(String fahrtdataname) { boolean found = false; Iterator<FahrtData> iterator = root.dataKeyIndex.iterator(); FahrtData fahrtxData; do { fahrtxData = (FahrtData) iterator.next(); if(fahrtxData.strKey.equalsIgnoreCase(fahrtdataname)) { return fahrtxData; } }while(iterator.hasNext()); return null; } Line 289 is : fahrtxData = (FahrtData) iterator.next(); My code for reset is the following: @Override public void reset() { if(root.fahrtKeyIndex.size()>0) { root.fahrtKeyIndex.clear(); } if(root.dataKeyIndex.size()>0) { root.dataKeyIndex.clear(); } db.commit(); } Can you help me find out why this is only working for one iteration? may be I have to modify my reset code.
×