167 words

NullpointerException when execute a merge

#1
2015-02-11 09:54

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.

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #19
#2
2015-02-11 12:04

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,134
#3
2015-02-11 13:05

Thank You, now it works.

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #20

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