Issue #666: NullPointerException in __odbGetNumMember

Type: Bug ReoprtVersion: 2.3.6Priority: NormalStatus: ClosedReplies: 6
#1

Hi,

When deleting an entity "Mitglied" -> everything works fine.

Trying to delete another one (in a separate transaction) always causes a NullPointer Exception in __odbGetNumMember line 1 of the enhanced Mitglied class. I am unable to replicate it in a simple testcase but it always happens in our implementation. I am posting the stack trace in the hope that it'll help to figure what's going wrong:

Mitglied(GalaxyJPAEntityQublet).__odbGetNumMember(int) line: 1
UMR.I(Object) line: 765
UMR.H(Object) line: 749
PMImpl(OBC).aD(Object, boolean) line: 665
PMImpl(OBC).UF(Object) line: 629
TYW.writeElement(OType, Object) line: 245
IndividualProfile.__odbWriteContent(OType[], OWriter) line: 1
MMM.af(Object, boolean, OWriter) line: 1031
UTY.writeStrictly(Object, OWriter) line: 1286
TYW.ar(Object, OType) line: 393
TYW.writeElement(OType, Object) line: 262
Mitglied(IndividualContact).__odbWriteContent(OType[], OWriter) line: 1
Mitglied.__odbWriteContent(OType[], OWriter) line: 1
MMM.af(Object, boolean, OWriter) line: 1031
UTY.aG(Object, TYW) line: 1195
UTY.aF(Object, long, TYW) line: 1184
ENH.a(ENT, TYW) line: 46
STA.T(EVC, TYW) line: 512
STM.E(EVC, TYW, boolean, int) line: 425
PMImpl(OBM).bI(EVC) line: 888
PMImpl.bI(EVC) line: 2186
PMImpl(OBM).bH(boolean) line: 804
PMImpl(OBM).bF() line: 719
PMImpl(EMImpl).commit() line: 276 [local variables unavailable]
#2

Here's the exception message:

 

Failed to commit transaction: Failed to get numeric value of field field version using enhanced method

version is annotated with @Version

#3

Okay.. weird enough, running exactly the same code twice (i.e. once again after the exception ocurred) the entity gets removed without any problems???

#4

The stack trace may indicate incomplete enhancement of the object model - i.e. some classes are enhanced and some other related classes (e.g. a super class) are not enhanced. If you enhance classes on the fly, it may be possible for some entity classes to be loaded before enhancement, depending on how exactly you do the enhancement.

If this is an incomplete enhancement issue - very little can be done on the ObjectDB side (including in improving the error message), since it is like a partial build of a Java application that produces JVM errors.

If it is something else - more details will be needed.

ObjectDB Support
#5

hi,

But how can that be because we're talking of the same class type.. the one that works at the first time but fails the second time and works third time again so I would doubt that it has to do with enhancement?

#6

It may also be related to schema evolution.

Can you post the database and/or a test?

ObjectDB Support
#7

This error might have been caused by partial build (compilation / enhancement).

The issue will be closed. Reopen it if it happens again after clean + rebuild.

ObjectDB Support

Reply