Put the following line just before opening the database
Db4o.configure().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));
i.e. your code shall look like
if (null == myDatabase) {
Db4o.configure().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));
}
myDatabase = Db4o.open(configurationObject, databaseFile);
Note: writing the reflexion instruction into the configurationObject won't work.
i.e. the following configuration will not take into account the reflection instruction
Configuration config = Db4o.configure();
config.reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));
[...]
myDatabase = Db4o.openFile(config, file = FILE);
Cordialement,
Nicolas.