NullpointerException when execute a merge

#1

How can we analyze the cause of an "Unexpected internal exception"?

 

We create an object tree that is persisted with "merge()". Then we want to persist “merge()” an new object of a different type.

 

[we use ObjectDb 2.6.0_3]

Caused by: com.objectdb.o.InternalException: Unexpected internal exception
at com.objectdb.o.JPE.h(JPE.java:168)
at com.objectdb.o.ERR.f(ERR.java:66)
at com.objectdb.o.OBC.onObjectDBError(OBC.java:1503)
at com.objectdb.jpa.EMImpl.merge(EMImpl.java:526)
at com.btc.ep.dal.persist.impl.PersistenceService.update(PersistenceService.java:111)
at com.btc.ep.base.dal.internal.BaseRepositoryImpl.update(BaseRepositoryImpl.java:95)
at com.btc.ep.base.dal.internal.MessageRepositoryImpl.addMessage(MessageRepositoryImpl.java:94)
at com.btc.ep.base.bl.internal.MessageServiceImpl.addMessage(MessageServiceImpl.java:179)
at com.btc.ep.base.bl.MessageService.info(MessageService.java:162)
at com.btc.ep.architecture.simulink.bl.internal.importer.CommonImporterBase.sendMessage(CommonImporterBase.java:201)
at com.btc.ep.architecture.targetlink.bl.internal.TargetLinkArchitectureImportServiceImpl.importArchitecture(TargetLinkArchitectureImportServiceImpl.java:383)
at com.btc.ep.architecture.targetlink.xmlbypass.ui.TargetLinkXmlBypassHandler.importSimulinkArchitectureXml(TargetLinkXmlBypassHandler.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
... 30 more
Caused by: java.lang.NullPointerException
at com.objectdb.o.MST.aY(MST.java:613)
at com.objectdb.o.MST.U9(MST.java:558)
at com.objectdb.o.WRA.U9(WRA.java:279)
at com.objectdb.o.LDR.F(LDR.java:563)
at com.objectdb.o.LDR.E(LDR.java:470)
at com.objectdb.o.OBC.UO(OBC.java:1080)
at com.objectdb.o.OBC.aN(OBC.java:966)
at com.objectdb.o.EMR.h(EMR.java:162)
at com.objectdb.o.TVS.g(TVS.java:104)
at com.objectdb.o.TVS.g(TVS.java:93)
at com.objectdb.o.EMR.q(EMR.java:76)
at com.objectdb.jpa.EMImpl.merge(EMImpl.java:523)
... 43 more

 

But if we use enhanced classes, we do not get this error.

During development, we work with non-enhanced classes.

Have you an idea what is the cause of this problem?
We can not reproduce this problem in a small example. It appears only in this constellation in our application.

#2

Thank you for this report. The stack trace indicates an exception on an attempt to merge objects with PK before persisting the first instance of this entity type to the database.

Please try build 2.6.0_04 that includes a fix.

ObjectDB Support
#3

Thank You, now it works.

Reply