Jump to content
McObject Forums


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Freek

  • Rank
  1. I'm using the database from an Android app and trying to store Serializable objects in a a SpatialIndexR2. I keep getting StorageErrors, caused by the NoSuchMethodException, which in turn is caused by the fact that it cannot find the constructor. This is logical, as the object I'm trying to store doesn't have a public no-argument constructor, as it is created using some factory object. The object, however, is implementing Serializable, so it shouldn't really need the constructor at all as it should be stored as a serialized object. The database is initialized as follows: db = StorageFactory.getInstance().createStorage(); db.setProperty("perst.serialize.transient.objects", true); db.open(path, pagePoolSize); root = (Root) db.getRoot(); if (root == null) { root = new Root(); root.index = db.createSpatialIndexR2(); db.setRoot(root); } [/code] The object, together with a RectangleR2, is stored using the following code [code] root.index.put(rectangle, object); root.index.store(); Is there somehow another way of storing Serializable objects which I've overlooked?