dain / leveldb

Port of LevelDB to Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't work on Android?

driventokill opened this issue · comments

It throws java.lang.ExceptionInInitializerError while initializing Iq80DBFactory.

try this before anything happens:
System.setProperty("sun.arch.data.model", "32");
System.setProperty("leveldb.mmap", "false");

If you can get it to work, let me know.

it works fine for me

Sorry for replying so late. It works fine after I set "sun.arch.data.model". Thanks.

Besides I found sometimes the database will be broken. I found these in collected error logs and cant easily to reproduce:

  1. Could not open table xxx
  2. CURRENT file does not end with newline

The first problem seems because the sst file is not created correctly. The 2nd is issued here:https://code.google.com/p/leveldb/issues/detail?id=69. Currently I only use leveldb as a cache, so when these problems occured, I just simplely destroy the database and rebuild it. But this is not a good solution, is there other way to fix?

I've submit a new issue for this here:#47

Thanks

commented

the workaround from @romanman also worked for me - but I would love to see #52 merged to get rid of this workaround and make it easier to use this lib on android

Does the settings value actually matter? i.e. for 64bit systems?