262 words

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

BugVersion: 2.4.0Priority: NormalStatus: FixedReplies: 4
2012-05-24 12:44

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|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_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(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


lorenz2304's picture
Joined on 2011-04-17
User Post #9
2012-05-24 12:52

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

lorenz2304's picture
Joined on 2011-04-17
User Post #10
2012-05-25 12:53

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)
support's picture
Joined on 2010-05-03
User Post #1,090
2012-05-26 08:21

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?

lorenz2304's picture
Joined on 2011-04-17
User Post #11
2012-05-27 21:10

The $ file is the recovery file.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #1,093

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB