ObjectDB ObjectDB

Issue #695: File lock exception on odb$

Type: Bug ReoprtVersion: 2.3.7Priority: NormalStatus: FixedReplies: 7

Not sure if this is an objectdb issue or not but I thought I'd raise it just in case.

We had a server failure which caused an unexpected reboot. As a result, the application services which use objectdb were not shutdown properly which in turn meant we had several odb$ files left behind. I had assumed that objectdb would reprocess these when the services restarted but instead we got the exception below.

No other process had a lock on the file, especially as the server had just been rebooted and the os allowed us to delete the files in question without any problem. In this case we weren't affected as the dbs were empty anyway but I'm a bit worried about data loss if & when this is not the case.

Caused by: com.objectdb.o._PersistenceException: Failed to open file 'F:\calculationservice\objectdb\dbs\workflow\uatsrtlonfo42-WSAgent-1-Instances.odb$'
at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45)
at com.objectdb.o.JPE.g(JPE.java:140)
at com.objectdb.o.ERR.f(ERR.java:59)
at com.objectdb.o.OST.onObjectDBError(OST.java:581)
at com.objectdb.jpa.EMF.createEntityManager(EMF.java:176)
at rbccm.felix.objectdb.workflow.ObjectDbInstanceContainer.flush(Unknown Source)
at rbccm.felix.objectdb.workflow.ObjectDbInstanceContainer.<init>(Unknown Source)
at rbccm.felix.objectdb.workflow.ObjectDbInstanceContainer.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 32 more
Caused by: com.objectdb.o.UserException: Failed to open file 'F:\calculationservice\objectdb\dbs\workflow\uatsrtlonfo42-WSAgent-1-Instances.odb$'
at com.objectdb.o.MSG.d(MSG.java:74)
at com.objectdb.o.LFL.X(LFL.java:1158)
at com.objectdb.o.LFL.H(LFL.java:857)
at com.objectdb.o.LFL.H(LFL.java:753)
at com.objectdb.o.SFL.J(SFL.java:476)
at com.objectdb.o.SFL.I(SFL.java:442)
at com.objectdb.o.SFL.<init>(SFL.java:252)
at com.objectdb.o.MST.<init>(MST.java:109)
at com.objectdb.o.MST.aI(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)
... 40 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.N(LFL.java:892)
at com.objectdb.o.LFL.H(LFL.java:843)
... 51 more

Similar exceptions have been viewed in the past but the source of this issue is still unclear.

Is this repeatable? i.e. can you get that exception every time you are trying to open that empty database with its associated odb$ file?

ObjectDB Support

It was repeatable at the time but we ended up deleting the odb$ to get the app started. I'll try to recreate the problem and if it happens again I'll send though the files.


I've had a further instance of this problem and have kept the databases. When I copy them locally and try to open using objectdb explorer I continue to get the same problem.

I've tried to upload the databases to the ftp site but I'm unable to connect - is it still available with the same connection details?


Ok, the ftp problem was on my end and has been resolved. I've uploaded the file OverlappingFileException.rar


Apparently there was a problem when a recovery file exists but it is empty.

Build 2.3.7_09 should fix this issue. Thank you for this report.

ObjectDB Support



I am experiencing the same problem:


JBWEB000309: type JBWEB000066: Exception report

JBWEB000068: message com.objectdb.o._PersistenceException: Failed to open file '/Users/username/JBossSoftware/jboss-eap-6.2/bin/$objectdb:/localhost:8080/db/guests.odb'


the path in persistence.xml is :

<property name="javax.persistence.jdbc.url" value="$objectdb://localhost:8080/db/guests.odb"/>


What could be the problem? 


my best regards


This is not the same problem, but just an error due to an invalid url specified.

Your question was moved to this forum thread and answered there.

ObjectDB Support


To post on this website please sign in.