393 words

ways to recover from DB curruption

#1
2012-08-24 04:29

Hi,

I have a database file which was mistakenly opened by a different version of my entities model and is now not usable any more.

When I try to open this file using explorer or even running the Doctor on it I get this exception:

Caused by: com.objectdb.o.UserException: Failed to generate dynamic type com.contextspace.myclass1
        at com.objectdb.o.MSG.d(MSG.java:74)
        at com.objectdb.o.ACL.d(ACL.java:166)
        at com.objectdb.o.STL.g(STL.java:97)
        at com.objectdb.o.TYM.findClass(TYM.java:1024)
        at com.objectdb.o.ACL.loadClass(ACL.java:131)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at com.objectdb.o.TYM.ax(TYM.java:1001)
        at com.objectdb.o.UTY.initSysType(UTY.java:327)
        at com.objectdb.o.TYS.l(TYS.java:163)
        at com.objectdb.o.TYM.ad(TYM.java:502)
        at com.objectdb.o.TYM.<init>(TYM.java:239)
        at com.objectdb.o.MST.aK(MST.java:179)
        at com.objectdb.o.SHN.Z(SHN.java:308)
        at com.objectdb.o.SHN.Y(SHN.java:259)
        at com.objectdb.o.SHN.K(SHN.java:123)
        at com.objectdb.o.HND.run(HND.java:133)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NoClassDefFoundError: com/contextspace/myclass2
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:632)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:478)
        at com.objectdb.o.ACL.d(ACL.java:155)
        ... 15 more
Caused by: java.lang.ClassNotFoundException: com.contextspace.myclass2
        at com.objectdb.o.TYM.findClass(TYM.java:1021)
        at com.objectdb.o.ACL.loadClass(ACL.java:131)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
        ... 19 more

 

where in my old entity model myclass2 didn't exist and in the new model myclass1 extends myclass2.

 

Is there any way to recover the file by somehow reloading the previous version of the class?

Thanks,

Eitan

eitane
eitane's picture
Joined on 2011-06-02
User Post #21
#2
2012-08-24 11:16

Try opening the database in your application (not in the Explorer / Doctor) with the new classes and with some changes to myclass1 and myclass2 (i.e. adding a dummy field that may be later removed).

If this doesn't help and you can send the database file - it may be possible to fix it manually.

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

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