Issue #422: Exception in thread "main" java.lang.NoSuchFieldError: __odbTracker

Type: Bug ReoprtVersion: 1.4.0Priority: NormalStatus: ClosedReplies: 3
#1

Hi

  there is something wrong with enhancement process I got that class was succesfully processed, log has size 0, enhancer is from build objectdb-2.2.8_08 and during object creation when some filed is initialised i got an exception

 

Exception in thread "main" java.lang.NoSuchFieldError: __odbTracker
at com.package.Network.__odbSet_Connections(Network.java:1)
at com.package.Network.<init>(Network.java:95)
at com.package.EnhancementTest.main(EnhancementTest.java:14)

 

Network class is implementing interface com.objectdb.spi.TrackableUserType but it has no __odbTracker field which is referenced in generated method:  __odbSet_Connections

 

br

Tomasz

 

 

#2

This might be the result of an incomplete enhancement - i.e. Network extends another persistence capable class that has not been enhanced (since __odbTracker is added once per hierarchy at the top level entity / persistence capable class).

In addition, you should enhance all your classes in one run.

ObjectDB Support
#3

hi

  This is the reason, for now we can move forward but without doubt me meet such problem in that model, it would be nice to have some output from the enhancer that __odbTracker was not added

 

br

Tomasz

#4

An ObjectDB Enhancer error in this case would be possible only if ObjectDB enforces enhancement of the entire object model in one run (which is recommended now - but not mandatory, since in some users may have to enhance different parts of their projects in several enhancement runs).

If multiple enhancement runs are allowed - this JVM error message (it is not an ObjectDB exception) in case of partial enhancement is inevitable - it is similar to JVM errors in case of incomplete compilation of a project.

 

ObjectDB Support

Reply