batosai at freenetproject.org a ?crit :
> Author: batosai
> Date: 2008-09-09 11:06:42 +0000 (Tue, 09 Sep 2008)
> New Revision: 22574
>
> Modified:
> trunk/plugins/WoT/src/plugins/WoT/WoT.java
> Log:
> Disabled everything in order to hunt bug #2562
>
> Modified: trunk/plugins/WoT/src/plugins/WoT/WoT.java
Basically, I just left this in the code :
public void runPlugin(PluginRespirator pr) {
Logger.debug(this, "Start");
db = Db4o.openFile("WoT.db4o");
try {
ObjectSet<Config> result = db.queryByExample(Config.class);
if(result.size() == 0) {
Logger.debug(this, "Created new config");
config = new Config(db);
db.store(config);
}
else {
Logger.debug(this, "Loaded config");
config = result.next();
config.initDefault(false);
}
}
catch(Exception e) {
Logger.error(this, e.getMessage(), e);
}
}
public void terminate() {
Logger.debug(this, "Cleanly closing the database");
db.commit();
db.close();
}
To reproduce the problem, you just have to load the plugin with an empty
database and click restart. Here's what I have in my logfile :
sept. 09, 2008 11:03:43:802 (plugins.WoT.WoT, Scheduled job:
freenet.pluginmanager.PluginHandler$PluginStarter at 1ccd159(40), DEBUG): Start
sept. 09, 2008 11:03:43:938 (plugins.WoT.WoT, Scheduled job:
freenet.pluginmanager.PluginHandler$PluginStarter at 1ccd159(40), DEBUG):
Created new config
sept. 09, 2008 11:03:49:428 (plugins.WoT.WoT, HTTP socket
handler at 23743079(16), DEBUG): Cleanly closing the database
sept. 09, 2008 11:03:49:471 (plugins.WoT.WoT, Scheduled job:
freenet.pluginmanager.PluginHandler$PluginStarter at 16b8ebc(37), DEBUG): Start
sept. 09, 2008 11:03:49:489 (plugins.WoT.WoT, Scheduled job:
freenet.pluginmanager.PluginHandler$PluginStarter at 16b8ebc(37), DEBUG):
Loaded config
sept. 09, 2008 11:03:49:489 (plugins.WoT.WoT, Scheduled job:
freenet.pluginmanager.PluginHandler$PluginStarter at 16b8ebc(37), ERROR):
com.db4o.reflect.generic.GenericObject cannot be cast to plugins.WoT.Config
java.lang.ClassCastException: com.db4o.reflect.generic.GenericObject
cannot be cast to plugins.WoT.Config
at plugins.WoT.WoT.runPlugin(WoT.java:86)
at
freenet.pluginmanager.PluginHandler$PluginStarter.run(PluginHandler.java:66)
at freenet.support.PooledExecutor$MyThread.run(PooledExecutor.java:190)
sept. 09, 2008 11:03:53:836 (plugins.WoT.WoT, HTTP socket
handler at 22041176(25), DEBUG): Cleanly closing the database
I tried SODA requests with the same result. I must be missing something
totally stupid... Could you enlighten me please ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080909/255661e4/attachment.pgp>