412 words

Issue #142 - File lock exception on odb$

BugVersion: 2.3.7Priority: NormalStatus: FixedReplies: 7
#1
2012-02-26 08:10

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
felixobjectdb
felixobjectdb's picture
Joined on 2011-02-10
User Post #110
#2
2012-02-26 15:30

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #941
#3
2012-02-27 10:37

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.

felixobjectdb
felixobjectdb's picture
Joined on 2011-02-10
User Post #113
#4
2012-03-26 08:28

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?

felixobjectdb
felixobjectdb's picture
Joined on 2011-02-10
User Post #115
#5
2012-03-26 09:38

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

felixobjectdb
felixobjectdb's picture
Joined on 2011-02-10
User Post #116
#6
2012-03-28 22:18

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #993
#7
2014-04-23 10:15

Hello! 

 

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

hussamcs
hussamcs's picture
Joined on 2014-04-23
User Post #1
#8
2014-04-25 15:17

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,858

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.
Attachments:
Maximum file size: 32 MB
Cancel