Home » Support » Issue Tracking » javax.jdo.JDONullIdentityException: The identity must not be null.

javax.jdo.JDONullIdentityException: The identity must not be null.

Type: BugVersion: 2.4.0Priority: NormalStatus: FixedReplies: 4
#1

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$
bjjl@ps2:~$

 

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

[...]

Caused by: javax.jdo.JDONullIdentityException: The identity must not be null.
        at javax.jdo.identity.SingleFieldIdentity.assertKeyNotNull(SingleFieldIdentity.java:92)
        at javax.jdo.identity.ObjectIdentity.<init>(ObjectIdentity.java:60)
        at com.objectdb.o.UTY.aK(UTY.java:1410)
        at com.objectdb.spi.DetachedTracker.<init>(DetachedTracker.java:82)
        at com.objectdb.o.ENT.getDetachTracker(ENT.java:939)
        at com.objectdb.o.ENT.w(ENT.java:329)
        at com.objectdb.o.STA.ae(STA.java:819)
        at com.objectdb.o.STM.D(STM.java:371)
        at com.objectdb.o.OBC.ae(OBC.java:222)
        at com.objectdb.o.OBM.close(OBM.java:184)
        at com.objectdb.o.OMF.close(OMF.java:867)
        ... 67 more

 

#2

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(MSG.java:74)
        at com.objectdb.o.LFL.Y(LFL.java:1174)
        at com.objectdb.o.LFL.I(LFL.java:873)
        at com.objectdb.o.LFL.I(LFL.java:769)
        at com.objectdb.o.SFL.<init>(SFL.java:225)
        at com.objectdb.o.MST.<init>(MST.java:109)
        at com.objectdb.o.MST.aJ(MST.java:94)
        at com.objectdb.o.MSF.UJ(MSF.java:178)
        at com.objectdb.o.OMF.am(OMF.java:746)
        at com.objectdb.jpa.EMF.am(EMF.java:156)
        at com.objectdb.o.OMF.al(OMF.java:692)
        at com.objectdb.jpa.EMF.createEntityManager(EMF.java:173)
        ... 27 more
Caused by: java.nio.channels.OverlappingFileLockException
        at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166)
        at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
        at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868)
        at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
        at com.objectdb.o.LFL.O(LFL.java:908)
        at com.objectdb.o.LFL.I(LFL.java:859)
        ... 36 more

#3

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)
#4

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?

#5

The $ file is the recovery file.

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

Post Reply

To post a reply and/or subscribe to update notifications - please login