On Thu, May 19, 2016 at 1:04 PM, Moses <[email protected]> wrote: > > (plugins.WebOfTrust.WebOfTrust, <noname>(51), ERROR): Error during startup > com.db4o.ext.Db4oIOException > at com.db4o.io.CachedIoAdapter.validateReadOnly(CachedIoAdapter.java:244) > at com.db4o.io.CachedIoAdapter.write(CachedIoAdapter.java:215) > at com.db4o.internal.PersistentBase.write(PersistentBase.java:171) > [...] > at > com.db4o.internal.LocalObjectContainer.createBTreeClassIndex(LocalObjectContainer.java:149) > at > com.db4o.internal.classindex.BTreeClassIndexStrategy.createBTreeIndex(BTreeClassIndexStrategy.java:78) > [...] > at com.db4o.internal.ClassMetadata.init(ClassMetadata.java:983) > [...] > at > com.db4o.internal.query.processor.QQueryBase.addClassConstraint(QQueryBase.java:190) > at > com.db4o.internal.query.processor.QQueryBase.constrain(QQueryBase.java:129) > at > plugins.WebOfTrust.WebOfTrust.peekDatabaseFormatVersion(WebOfTrust.java:1468) > at plugins.WebOfTrust.WebOfTrust.openDatabase(WebOfTrust.java:630) > [...]
This looks simple to me. `peekDatabaseFormatVersion` opens the database with a read-only configuration obtained through `getNewDatabaseConfiguration(true)`, however the latter configures indexes regardless of the read-only flag. When adding a constraint (line 1468) Db4o then attempts to initialize these indexes (`createBTreeIndex` and friends). In this initialization, Db4o tries to write, and the read-only configured CachedIoAdapter bails out. Long story short: don't attempt to configure indexes on read-only databases ;-) Should be an easy fix. Kind regards, Bert _______________________________________________ Devl mailing list [email protected] https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
