fusesource / leveldbjni

A Java Native Interface to LevelDB
BSD 3-Clause "New" or "Revised" License
538 stars 144 forks source link

Windows x64 IO error when opening database #43

Closed drey7925 closed 11 years ago

drey7925 commented 11 years ago

When opening the database with the factory.open(File file, Options options) method on Windows 7 x64, I get the following IOError:

org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: C:\path\without\spaces\to\db\MANIFEST-000005: The handle is invalid.

    at org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200)
    at org.fusesource.leveldbjni.internal.NativeDB.open(NativeDB.java:218)
    at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:168)
...

When I looked at MANIFEST-000005 under Notepad++ it looks like some sort file full of nulls and control characters and a bit of text, leveldb.BytewiseComparator. Not sure what that has to do with it, but I can't find a workaround at the moment. The DB is in a gitignored path on my local disk, no spaces. I'm using leveldbjni-all, version 1.7(bundle) out of Maven. Older versions do not fix the issue.

chirino commented 11 years ago

Which version?

drey7925 commented 11 years ago

I just rechecked this, and it looks like this is a bug of my use of LevelDB. I accidentally opened the same database multiple times and it failed in this non-graceful manner. This may be closed.