On Tue, Sep 09, 2008 at 01:14:55PM +0200, Julien Cornuwel wrote:
> 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 ?
Have you tried storing each sub-object, and fetching them? On what
object does it choke?
The web of trust plugin is critical for a wide range of UI changes that
we're going to need in the near future. I will attempt to debug this
later today. Right now I have some hardware issues to deal with. Thanks.