Fast Object Database for Java - with JPA/JDO support

Issue #799: javax.jdo.JDONullIdentityException: The identity must not be null.

Type: Bug reoprtVersion: 2.4.0Priority: NormalStatus: FixedReplies: 4

When stopping my JEE 6 Web Profile application in Glassfish 3.1.1, I sometimes get this exception, yielding in not merging athene.odb and athene.odb$. A bug in objectdb? 


bjjl@ps2:~$ ls -l /var/db/athene/
total 122080
-rw-r--r-- 1 bjjl webservd   2621440 2012-05-24 16:40 athene.odb
-rw-r--r-- 1 bjjl webservd 122265952 2012-05-24 16:40 athene.odb$


[#|2012-05-24T14:40:38.313+0200|SEVERE|glassfish3.1.1||_ThreadID=24;_ThreadName=Thread-2;|Cannot stop module
[ObjectDB 2.3.7_25] javax.persistence.PersistenceException
Exceptions during EntityManagerFactory close (error 512)
        at net.pocketservices.athene.lib.EntityManagerFilter.destroy(
        at org.apache.catalina.core.ApplicationFilterConfig.release(
        at org.apache.catalina.core.StandardContext.filterStop(
        at org.apache.catalina.core.StandardContext.stop(
        at com.sun.enterprise.web.WebModule.stop(
        at org.apache.catalina.core.ContainerBase.removeChild(


Caused by: javax.jdo.JDONullIdentityException: The identity must not be null.
        at javax.jdo.identity.SingleFieldIdentity.assertKeyNotNull(
        at javax.jdo.identity.ObjectIdentity.<init>(
        at com.objectdb.o.UTY.aK(
        at com.objectdb.spi.DetachedTracker.<init>(
        at com.objectdb.o.ENT.getDetachTracker(
        at com.objectdb.o.ENT.w(
        at com.objectdb.o.STM.D(
        at com.objectdb.o.OBM.close(
        at com.objectdb.o.OMF.close(
        ... 67 more



After this crash, the database seems to be corrupted, I cannot execute my pages anymore after restart of the web application: com.objectdb.o._PersistenceException: Failed to open file '/var/db/athene/athene.odb'

So this is a critical issue for me.

Caused by: com.objectdb.o.UserException: Failed to open file '/var/db/athene/athene.odb'
        at com.objectdb.o.MSG.d(
        at com.objectdb.o.LFL.Y(
        at com.objectdb.o.LFL.I(
        at com.objectdb.o.LFL.I(
        at com.objectdb.o.SFL.<init>(
        at com.objectdb.o.MST.<init>(
        at com.objectdb.o.MST.aJ(
        at com.objectdb.o.MSF.UJ(
        at com.objectdb.jpa.EMF.createEntityManager(
        ... 27 more
Caused by: java.nio.channels.OverlappingFileLockException
        at java.nio.channels.FileChannel.tryLock(
        at com.objectdb.o.LFL.O(
        at com.objectdb.o.LFL.I(
        ... 36 more


The exception in #2 reflects a locked database file (due to a failure during close) and not a corrupted database. Anyway, please try build 2.4.0_03 that should fix this issue.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Thank you for the quick fix. Replaced the library already, and will report if anything goes wrong again (hopefully not).

How is the main db file and the one with $ appended actually playing together? Is it some kind of cache?


The $ file is the recovery file.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply