godwingrs22 / jdbm2

Automatically exported from code.google.com/p/jdbm2
1 stars 0 forks source link

File left locked after exception during init #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

You need to make sure that you close all locked files in RecordFile
as if the file is corrupted a Throwable is raised on init and a lock on teh 
file is kept from RecordFile - e.g. no way to delete the file pragmatically 
after this type of Exception ( Throwable )

Exception in thread "main" java.lang.InternalError: Unknown serialization 
header: 227
    at jdbm.helper.Serialization.readObject(Serialization.java:887)
    at jdbm.helper.Serialization.deserializeArrayList256Smaller(Serialization.java:1116)
    at jdbm.helper.Serialization.readObject(Serialization.java:840)
    at jdbm.recman.TransactionManager.recover(TransactionManager.java:206)
    at jdbm.recman.TransactionManager.<init>(TransactionManager.java:87)
    at jdbm.recman.RecordFile.<init>(RecordFile.java:111)
    at jdbm.recman.BaseRecordManager.reopen(BaseRecordManager.java:237)
    at jdbm.recman.BaseRecordManager.<init>(BaseRecordManager.java:232)
    at jdbm.RecordManagerFactory.createRecordManager(RecordManagerFactory.java:74)
    at jdbm.RecordManagerFactory.createRecordManager(RecordManagerFactory.java:52)

Regards
Vasko  

Original issue reported on code.google.com by vtoma...@gmail.com on 7 Jul 2013 at 5:28

GoogleCodeExporter commented 8 years ago
JDBM2 is dead, please use MapDB

Original comment by kja...@gmail.com on 7 Jul 2013 at 5:39

GoogleCodeExporter commented 8 years ago
what to you in place of :

PrimaryTreeMap<String, Long>

and

PrimaryHaspMap<String, Long>

in MapDB ? no threadsafty needed

Original comment by vtoma...@gmail.com on 7 Jul 2013 at 6:17

GoogleCodeExporter commented 8 years ago
db.getTreeMap... 
just check examples

Original comment by kja...@gmail.com on 7 Jul 2013 at 6:29