Enhancement of type is old and cannot be used

#1

Hi,

since I switched to 2.8.3_05 from 2.7.6, the ODB log of my app is full of such messages as:
 

[2021-01-26 15:20:33 #22 type.user] 
Enhancement of type eu.extech.quant.listing.data.ProductListingRequest is old and cannot be used (7565612861610389504:-6156153180704156499)

[2021-01-26 15:20:33 #23 type] 
Type eu.extech.quant.listing.data.ProductListingRequest is not enhanced.

[2021-01-26 15:20:33 #24 type] 
Type eu.extech.quant.listing.data.ProductListingStateChangeList is not enhanced.

 

As u can see the first and second message relates to the same class, the third message is for a different class and for that class there was no "Enhancement of type ..." message before.

I am using post-compile, pre-build enhancing, so every existing class I use is enhanced correctly and NOT listed in the log. All the listed classes in the ODB log are not existing anymore in my code. They were present before and also saved in the DB, but are deleted for some time now.

When I open the DB Explorer, I can see those non-existing classes from the log listed as Entities, but they have 0 instances. I also noticed, that the list of reported classes is dependant on DB instance. When I run the same version of the app on 1 DB instance, I get 50 classes with "Type ... is not enhanced" and 10 with "Enhancement of type ... is old" message, but on the other DB I get 3 and 1 classes with those messages.

So it seems like the DB file itself remembers somehow the DB Scheme and tells the app that there are these old classes without enhancement. Can I clean those old classes from the DB file or even better can I make ObjectDB not reporting them without manually fixing each DB ?

#2

You can delete old classes using the Explorer of version 2.8.3_05
(right click -> Delete, or from the Edit menu).

Please check if this solves the issue.

ObjectDB Support
#3

I deleted some of the deprecated classes through the DB Explorer and then I got the following exception after starting the applicacation:

Caused by: java.lang.NullPointerException: Cannot invoke "com.objectdb.o.UTY.w()" because "this.F" is null
    at com.objectdb.o.UTY.P(UTY.java:1284)
    at com.objectdb.o.TYS.k(TYS.java:169)
    at com.objectdb.o.TYM.Z(TYM.java:546)
    at com.objectdb.o.TYM.<init>(TYM.java:196)
    at com.objectdb.o.OMF.w(OMF.java:865)
    at com.objectdb.o.OMF.s(OMF.java:817)
    at com.objectdb.o.OMF.x(OMF.java:715)
    at com.objectdb.jdo.PMF.getPersistenceManager(PMF.java:561)

 

#4

The stack trace indicates an incomplete model due to a class that is missing its super class.

If you deleted an old super class try to delete also its old subclasses.

ObjectDB Support

Reply