NPE after an @embedded obj is updated for a detached entity


I have an entity that looks like this:

class User {
    @embedded private Profile profile;

After running something like this:

    User user = entityManager.createQuery("select......

I get the following error:

 [ObjectDB 2.0.3_02] Unexpected exception (Error 990)
 Generated by Java HotSpot(TM) Client VM 1.6.0_21 (on Windows 7 6.1).
 Please report this error to ObjectDB support (
 com.objectdb.o.InternalException: java.lang.NullPointerException: null
 at com.objectdb.o.ENT.W(
 at com.objectdb.o.ENT.beforeModifyEmbedded(
 at com.objectdb.o.EMT.beforeModifyMember(
 at com.test.user.UserProfile.__odbSet_description(
 at com.test.user.UserProfile.setDescription(
 at com.test.user.PersistUserTest.updateDetachedUser(

Did I miss some configuration or is this a bug?


It is a bug. Thank you for your report.

Please try build 2.0.3_04 that should fix it.

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

Post Reply

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