Menu

Exception while using DatabaseImpl.getTableNames

Help
beekay
2019-11-20
2019-11-20
  • beekay

    beekay - 2019-11-20

    Hi,

    I faced the following exception while getting the table names in a database for a particular file.

    java.lang.IllegalStateException: Row is deleted: 3523:240 (Db=.........;Table=MSysObjects)
    at com.healthmarketscience.jackcess.impl.TableImpl.requireNonDeletedRow(TableImpl.java:3061)
    at com.healthmarketscience.jackcess.impl.TableImpl.getRow(TableImpl.java:667)
    at com.healthmarketscience.jackcess.impl.CursorImpl.getCurrentRow(CursorImpl.java:699)
    at com.healthmarketscience.jackcess.impl.CursorImpl$BaseIterator.next(CursorImpl.java:822)
    at com.healthmarketscience.jackcess.impl.CursorImpl$BaseIterator.next(CursorImpl.java:779)
    at com.healthmarketscience.jackcess.impl.DatabaseImpl$TableFinder.getTableNames(DatabaseImpl.java:2202)
    at com.healthmarketscience.jackcess.impl.DatabaseImpl.getTableNames(DatabaseImpl.java:908)
    at com.healthmarketscience.jackcess.impl.DatabaseImpl.getTableNames(DatabaseImpl.java:894)

    Please let me know the reason. Thanks in advance.

     
    • James Ahlborn

      James Ahlborn - 2019-11-20

      my guess would be that you have a db where the index is out of sync with the table (the index is pointing to deleted rows). jackcess assumes that index entries always point to valid rows. the simplest solution is to run "compact and repair" on the db and i'd guess that it would fix the issue.

       

Log in to post a comment.