An entityManager.flush() with many entities is not possible

Type: BugVersion: 2.6.0Priority: NormalStatus: ActiveReplies: 1
#1

 

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.

 

 

#2

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)

Post Reply

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