Hi guys,
I tried to recompile a project today that used to work just fine, and I am getting the following exception:
Caused by: java.lang.NullPointerException
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.checkClassRegistration(OObjectEntitySerializer.java:350)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.isTransientField(OObjectEntitySerializer.java:291)
at com.orientechnologies.orient.object.enhancement.OObjectMethodFilter.isGetterMethod(OObjectMethodFilter.java:114)
at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.invoke(OObjectProxyMethodHandler.java:114)
at bb.model.Options_$$_javassist_0.getWindowLocationX(Options_$$_javassist_0.java)
at bb.app.Config.initilizaOptions(Config.java:189)
at bb.app.Config.<init>(Config.java:183)
From what i understand something has broken in the serialization process of my options object. The error comes when i try to GET any of the attributes of the object; for example, in this exception is occurs when I call getWindowLocationX()
Here is the code I use to load the object, which worked fine in the past.
static public synchronized Options getPersistentOptions() {
OObjectDatabaseTx oOdb = bb.odb.ObjectOrientDb.getDbFromPool();
Options result = null;
try {
OObjectIteratorClass iter = oOdb.browseClass(Options.class);
if (iter.hasNext()) {
result = (Options) iter.next();
System.out.println("Loaded options ORID: " + result.getId().toString());
} else { //No object }
} finally {
oOdb.close();
}
return result;
}
I tried rebuilding the database from scratch, and it was built successfully, but the error keeps coming. Therefore I think the bug is on the client side..
I am using Orientdb 2.1.3
Any ideas? Thanks :)
Ioannis