196 words

Issue #246 - An entityManager.flush() with many entities is not possible

BugVersion: 2.6.0Priority: NormalStatus: ActiveReplies: 1
#1
2015-02-19 09:54

 

The following exception occures if we call entityManager.flush() where the corresponding JPA PersistenceContext has many entities and relations. What is the reason for the exception? entityManager.getTransaction().commit() instead of a entityManager.flush() works correctly. Unfortunately I have not found a simple example to reproduce this exception. The entity model of the flushed JPA PersistenceContext is too complex. 

[ObjectDB 2.6.0_01] javax.persistence.PersistenceException
Failed to read from file 'C:\Users\pg\AppData\Local\Temp\ObjectDB\objectdb_2254766968035459242\ObjectUpdates_2.mrg'
(error 117)
        at com.mycompany.MapApp.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.objectdb.o.UserException: Failed to read from file 'C:\Users\pg\AppData\Local\Temp\ObjectDB\objectdb_
2254766968035459242\ObjectUpdates_2.mrg'
        at com.objectdb.o.MSG.d(MSG.java:75)
        at com.objectdb.o.LFL.U(LFL.java:1102)
        at com.objectdb.o.FIR.o(FIR.java:120)
        at com.objectdb.o.BYR.B(BYR.java:285)
        at com.objectdb.o.VUT.k(VUT.java:476)
        at com.objectdb.o.VUT.j(VUT.java:364)
        at com.objectdb.o.VUT.j(VUT.java:350)
        at com.objectdb.o.PRU.aa(PRU.java:212)
        at com.objectdb.o.VUT.k(VUT.java:689)
        at com.objectdb.o.VUT.j(VUT.java:364)
        at com.objectdb.o.VUT.j(VUT.java:350)
        at com.objectdb.o.FCL.h(FCL.java:110)
        at com.objectdb.o.VLT.k(VLT.java:149)
        at com.objectdb.o.UTT.A(UTT.java:355)
        at com.objectdb.o.UTT.l(UTT.java:203)
        at com.objectdb.o.TSK.i(TSK.java:145)
        at com.objectdb.o.TSK.f(TSK.java:95)
        at com.objectdb.o.MST.ae(MST.java:1442)
        at com.objectdb.o.MST.Vg(MST.java:1315)
        at com.objectdb.o.WRA.Vg(WRA.java:381)
        at com.objectdb.o.WSM.Vg(WSM.java:153)
        at com.objectdb.o.OBM.bR(OBM.java:976)
        at com.objectdb.o.OBM.bO(OBM.java:847)
        at com.objectdb.o.OBM.flush(OBM.java:763)
        ... 7 more
Caused by: java.lang.NullPointerException
        at com.objectdb.o.LFL.X(LFL.java:1157)
        at com.objectdb.o.LFL.U(LFL.java:1098)
        ... 29 more

The same stacktrace also occures in ObjectDb version 2.6.1.

 

 

PG
PG's picture
Joined on 2012-06-28
User Post #21
#2
2015-02-20 09:51

The cause of this exception is unclear.

Flush of large amount of data requires using temporary files and the exception indicates a problem in using these files. Please check this forum thread. Maybe disabling deletion of temporary files could help.

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,149

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