Re: The plugin WebOfTrust could not be loaded

[email protected]
Newsgroups gmane.network.freenet.devel
Organization Freenet Project
Message-ID <3898304.4aVn4rHSh5@1337h4x0r>
On Thursday, May 19, 2016 01:33:11 PM Bert Massop wrote:
> 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(LocalObj
> >     ectContainer.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(QQuer
> >     yBase.java:190) at
> >     com.db4o.internal.query.processor.QQueryBase.constrain(QQueryBase.jav
> >     a:129) at
> >     plugins.WebOfTrust.WebOfTrust.peekDatabaseFormatVersion(WebOfTrust.ja
> >     va: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.

I did the following procedure (with build0018):
1. Comment out all index creation code in getNewDatabaseConfiguration()
2. Start WoT to create a fresh database without any indexes, create an own 
identity, stop it.
3. Re-enable the index creation code. Start WoT again to make the 
peekDatabaseFormatVersion() hit the database which has no indexes.
db4o now should have tried to create them as you suspected.
If what you suspected was right, this should have reprocuded the error - but 
it did not :(

Any other ideas?

If not,  I would suspect the affected database was just randomly broken :|

_______________________________________________
Devl mailing list
[email protected]
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAABCAAGBQJXmrTaAAoJEMtmZ+8tjWt5j8MP/2cQc0cylcpxBAXiONVfhZzg
PnX7UQxPRsM2jLUowi6XkyFi1J9gA1KbNRJu0y38fdEpX6OBMYwY5oGRE1ls7DQd
mwow9g+fAlZnt0Br0ZNerRUhum1HcmTHQw4c+JqqDaddyuszAuSENYktyOrRkmUz
TKgcxCvwKXukhNFBc61E2CvtFbjgZPPNuw/3tX5Rc4kI346W3fe5Ce143IrmgPf8
jZO5m7XjLRY8JbRA6JR7Ikgk71IxEM2Rwwv3V/ByeRDHgJZk6V6Tf0Hl4r+Q/8PU
6qw5I8o25WOwMliZLIl/v3gdo5m5wzJ1iJd8dAKDq6tj2gnQxNe6biRLfxzX8tLw
JteYIRhn16igIWLAPqpTvEC2To0sonm0busz70tnhryUySC2QP09S3H+bnRvnW2M
if8GZl0Bqd6IHqpisFAonXQhOnvXV4f2Kd0jTUFGD0ZnJ/P21V6UfZIzrs25BgsD
qniwSMqua9Bl91qGT57BnEs3r8Z5HMx5fDYxnldp3uI7cY1EcmqKIhKZ/fW/2Jda
7F3mvH1El4O0jYstZAIPON2KLL5wA3MkYjAhxSYU9ljYXoVJojsWgbzqpGOQSBM8
+CgrFaQjPIviLhjepGmbmjSNJL79+S5g5jVachRUEiool2SlkP/4cw4UGmmY3+2J
OgpT0Xhx/1iqgozEWJeB
=mE1p
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.