363 words

Issue #137 - NullPointerException in __odbGetNumMember

BugVersion: 2.3.6Priority: NormalStatus: ClosedReplies: 6
#1
2012-02-06 14:55

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]
quasado
quasado's picture
Joined on 2011-04-30
User Post #107
#2
2012-02-06 15:03

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

quasado
quasado's picture
Joined on 2011-04-30
User Post #109
#3
2012-02-06 15:04

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

quasado
quasado's picture
Joined on 2011-04-30
User Post #110
#4
2012-02-07 04:53

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #908
#5
2012-02-07 07:45

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?

quasado
quasado's picture
Joined on 2011-04-30
User Post #111
#6
2012-02-07 08:37

It may also be related to schema evolution.

Can you post the database and/or a test?

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #912
#7
2012-02-16 14:09

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #927

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel