com.objectdb.o._RollbackException: Failed to commit transaction

#1

Check the Exception below: (occurs sometimes, ObjectDB 2.3.6_14)

com.objectdb.o._RollbackException: Failed to commit transaction:
        at com.objectdb.o.JPE.g(JPE.java:89) ~[JPE.class:na]
        at com.objectdb.o.ERR.f(ERR.java:59) ~[ERR.class:na]
        at com.objectdb.o.OBC.onObjectDBError(OBC.java:1493) ~[OBC.class:na]
        at com.objectdb.jpa.EMImpl.commit(EMImpl.java:279) ~[EMImpl.class:na]
        at com.app.dao.impl.ObjectdbExpeditionDAO.batchUpdateExpedition(ObjectdbExpeditionDAO.java:117) ~[ObjectdbExpeditionDAO.class:na]
        at com.app.ExpeditionManager.updateAllExpeditions(ExpeditionManager.java:287) [ExpeditionManager.class:na]
        at com.app.ExpeditionManager.run(ExpeditionManager.java:390) [ExpeditionManager.class:na]
        at java.lang.Thread.run(Thread.java:619) [na:1.6.0_21]
java.lang.StackOverflowError: null
        at com.objectdb.o.TYM.ar(TYM.java:862) ~[TYM.class:na]
        at com.objectdb.o.ENT.v(ENT.java:356) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:424) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]
        at com.objectdb.o.ENT.v(ENT.java:373) ~[ENT.class:na]

        ............
#2

According to the stack trace you may have a map whose one of its values is the map itself (or another map in a way that causes some sort of circular relationship).

Supporting such structures will require some fix in ObjectDB, but since it is not allowed by JPA anyway - consider changing your model and using user defined classes (that may contain maps) as map values.

ObjectDB Support

Reply