DB Explorer and Doctor unable to open DB file

#1

Hi,

one of my DB files can not be open by neither DB explorer, nor the DB Doctor. Both are writing same mistake :

ObjectDB Doctor [version 2.5.6_05]
Copyright (c) 2014, ObjectDB Software. All rights reserved.

-------------------------
No errors have been found
-------------------------
com.objectdb.o.UserException: Failed to generate dynamic type quant.phdsc_new.placement_builder.data.RackModel
at com.objectdb.o.MSG.d(MSG.java:75)
at com.objectdb.o.ACL.d(ACL.java:167)
at com.objectdb.o.STL.g(STL.java:97)
at com.objectdb.o.TYM.findClass(TYM.java:1036)
at com.objectdb.o.ACL.loadClass(ACL.java:131)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.objectdb.o.TYM.ay(TYM.java:1013)
at com.objectdb.o.UTY.initSysType(UTY.java:331)
at com.objectdb.o.TYS.l(TYS.java:166)
at com.objectdb.o.TYM.ae(TYM.java:511)
at com.objectdb.o.TYM.<init>(TYM.java:194)
at com.objectdb.o.MST.aM(MST.java:190)
at com.objectdb.o.DMR.D(DMR.java:253)
at com.objectdb.o.DMR.B(DMR.java:164)
at com.objectdb.Doctor.main(Doctor.java:22)
Caused by: java.lang.NoClassDefFoundError: quant/phdsc_new/model/SelectionModel
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at com.objectdb.o.ACL.d(ACL.java:155)
... 13 more
Caused by: java.lang.ClassNotFoundException: quant.phdsc_new.model.SelectionModel
at com.objectdb.o.TYM.findClass(TYM.java:1033)
at com.objectdb.o.ACL.loadClass(ACL.java:131)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more

[ObjectDB 2.5.6_05] Failed to generate dynamic type quant.phdsc_new.placement_builder.data.RackModel (error 361)

 

My application can work with the DB file without difficulties though (reading and storing the embedded type RackModel). The type SelectionModel (which is not found) is the parent of RackModel and a descendant of java.util.Observable.

I am not sure if it's relevant, but I recently upgraded from ObjectDB 1 to 2 and converted this DB file to the new format.

Any ideas how to resolve this ?

#2

The difference between your application and the Explorer/Doctor is that your application has access to all your classes, and the Explorer and Doctor try to work without your classes by generating synthetic classes from the schema.

This synthetic class generation mechanism fails with your specific schema due to unknown reason. If you can share the relevant class files (RackModelSelectionModel) it may help in understanding the problem, and possibly suggesting a fix.

Alternatively, a simple workaround that should solve these exceptions is to run the Doctor and the Explorer with a classpath that includes access to all your classes. In that case the synthetic class generation mechanism will not be needed.

ObjectDB Support
#3

The workaround with the changed classpath for Doctor and Explorer worked. I made a starting script for them, so I am willing to use them like this. The mentioned classes I can not share because of keeping the company secret.

Thanks for your help.
 

Reply