ObjectDB ObjectDB

NPE when getting Persistence manager

#1

Hi,

on 1 of our databases we get this exception upon trying to get the Persistence Manager.

We use there ODB version 2.8.3.b05 in embedded mode.

java.lang.NullPointerException: Cannot invoke "com.objectdb.o.MMM.y()" because "<local13>" is null
        at com.objectdb.o.TYS.f(TYS.java:750)
        at com.objectdb.o.TYS.Z3(TYS.java:606)
        at com.objectdb.o.TYM.Z(TYM.java:570)
        at com.objectdb.o.TYM.<init>(TYM.java:196)
        at com.objectdb.o.OMF.w(OMF.java:865)
        at com.objectdb.o.OMF.s(OMF.java:817)
        at com.objectdb.o.OMF.x(OMF.java:715)
        at com.objectdb.jdo.PMF.getPersistenceManager(PMF.java:561)
        at eu.extech.db_utils.jdo.BasicJDOConnection.<init>(BasicJDOConnection.java:53)

I tried also the ODB doctor on that DB file, but it wrote nothing special:

ObjectDB Doctor [version 2.8.3_05]

Copyright (c) 2021, ObjectDB Software. All rights reserved.


Scanning the database file...

.................................................. 100MB

.................................................. 200MB

.................................................. 300MB

.................................................. 400MB

............................................... 494MB (total)

Analyzing database structure...

10% 20% 30% 40% 50% 60% 70% 80% 90% 100%


No errors have been found.


Creating a database copy...

........  179084 entity objects (total) have been migrated.


New database copy is ready at: fixed/./private.odb

[./private.odb] Took 20 seconds


Filesize before: 495M   ./private.odb

Filesize after: 489M    fixed/./private.odb


Could You please advice us what to do ?

edit
delete
#2

There is some issue with the types in this database, possibly due to an old issue of unsupported schema upgrade, which might be be fixed by now. It may possibly be solved if you update your entity classes (class files) to a version that works well with other databases and/or switch to the last ObjectDB version.

ObjectDB Support
edit
delete
#3

It turned out, that we used the same DB file with newer version of code and then with older version, so there might have been some schema upgrade in between, which the old version did not have. So we replaced the file with a backup from older code and it works now fine. 
Thanx!

edit
delete

Reply

To post on this website please sign in.