Issue #1615: An entityManager.flush() with many entities is not possible

Type: BugVersion: 2.6.0Priority: NormalStatus: ActiveReplies: 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 Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$ Source)
        at Source)
Caused by: com.objectdb.o.UserException: Failed to read from file 'C:\Users\pg\AppData\Local\Temp\ObjectDB\objectdb_
        at com.objectdb.o.MSG.d(
        at com.objectdb.o.LFL.U(
        at com.objectdb.o.FIR.o(
        at com.objectdb.o.BYR.B(
        at com.objectdb.o.VUT.k(
        at com.objectdb.o.VUT.j(
        at com.objectdb.o.VUT.j(
        at com.objectdb.o.PRU.aa(
        at com.objectdb.o.VUT.k(
        at com.objectdb.o.VUT.j(
        at com.objectdb.o.VUT.j(
        at com.objectdb.o.FCL.h(
        at com.objectdb.o.VLT.k(
        at com.objectdb.o.UTT.A(
        at com.objectdb.o.UTT.l(
        at com.objectdb.o.TSK.i(
        at com.objectdb.o.TSK.f(
        at com.objectdb.o.MST.Vg(
        at com.objectdb.o.WRA.Vg(
        at com.objectdb.o.WSM.Vg(
        at com.objectdb.o.OBM.bR(
        at com.objectdb.o.OBM.bO(
        at com.objectdb.o.OBM.flush(
        ... 7 more
Caused by: java.lang.NullPointerException
        at com.objectdb.o.LFL.X(
        at com.objectdb.o.LFL.U(
        ... 29 more

The same stacktrace also occures in ObjectDb version 2.6.1.




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