com.objectdb.o.UserException: Failed to generate dynamic type

#1

Hi,

I am trying to open a DB and I get the following error:

 

Exception in thread "main" [ObjectDB 2.6.1_05] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0_25 (on Mac OS X 10.10.3).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
java.lang.NullPointerException
at com.objectdb.o.OBI.t(OBI.java:391)
at com.objectdb.o.OBI.r(OBI.java:271)
at com.objectdb.o.OBI.Vp(OBI.java:240)
at com.objectdb.o.BQI.Vz(BQI.java:151)
at com.objectdb.o.PRG.ai(PRG.java:782)
at com.objectdb.o.PRG.ag(PRG.java:711)
at com.objectdb.o.PRG.af(PRG.java:553)
at com.objectdb.o.QRM.Vb(QRM.java:286)
at com.objectdb.o.MST.Vb(MST.java:978)
at com.objectdb.o.WRA.Vb(WRA.java:311)
at com.objectdb.o.WSM.Vb(WSM.java:115)
at com.objectdb.o.QRR.g(QRR.java:247)
at com.objectdb.o.QRR.f(QRR.java:153)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:716)

I also tried to run the Dr to see and I got the following error:

java -cp objectdb.jar com.objectdb.Doctor ../db/DB_1.odb
ObjectDB Doctor [version 2.6.1_05]
Copyright (c) 2015, ObjectDB Software. All rights reserved.

-------------------------
No errors have been found
-------------------------
com.objectdb.o.UserException: Failed to generate dynamic type Entities.AbstractLong
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:1046)
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:1014)
at com.objectdb.o.UTY.initSysType(UTY.java:345)
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.aN(MST.java:193)
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: Entities/AbstractNumber
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: Entities.AbstractNumber
at com.objectdb.o.TYM.findClass(TYM.java:1043)
at com.objectdb.o.ACL.loadClass(ACL.java:131)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
[ObjectDB 2.6.1_05] Failed to generate dynamic type Entities.AbstractLong (error 361)

The class Entities.AbstractNumber and Entities.AbstractLong exists - so it should not be a problem.

The DB is pretty large (1GB) so can't really upload it.

What should I do to open it?

Thanks

#2

The Doctor, the Server and the Explorer usually work with no access to your classes, but you may also run them with specifying a classpath that contains your classes, if generating these classes from the database schema fails.

What is the hierarchy of AbstractLong and AbstractNumber? If AbstractNumber extends a Java class other than java.lang.Object (java.lang.Number?) it could cause issues, since entity classes should not extend other Java classes.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Can you point to a tutorial on how to specify the classpath?

I am surprised that an Entity class should not extend other Java classes - seems to work pretty well usually - I reported an issue (http://www.objectdb.com/database/forum/811).

Thanks a lot

EKK

#4

See the Server, Explorer and Doctor documentation regarding how to run them as Java programs, e.g.

> java -cp objectdb.jar com.objectdb.Server

Add your class files directory / jar file to the classpath using the standard JVM -cp-classpath argument.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#5

Reading about Schema Update. I see there is Package/Class/Field elements in the schema - but where do I find the schema section? In which file is it? Is it something internal to every objectDB database?

Thanks

#6

Ah I found it in the configuration file.

Is there a way to extract the schema from an existing Database? i.e. without using my class files

Thanks

#7

Please use a new separate forum thread for every new subject.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login