Issue #2834: Transaction size limit

Type: Bug ReoprtVersion: 2.8.3Priority: NormalStatus: FixedReplies: 6

Although I read in this post
that the size of the transaction has no hard limit, our experience shows that we can not commit a transaction exceeding 2GB even though the ObjectDB server runs with Xmx15G.
We get the following exception in our JDO transaction in version 2.8.3_05 using client-server mode:

Caused by: java.lang.NegativeArraySizeException: -2147483648
        at com.objectdb.o.FIW.m(
        at com.objectdb.o.BYW.h(
        at com.objectdb.o.BYW.h(
        at com.objectdb.o.RQC.ZG(
        at com.objectdb.o.WSN.a(
        at com.objectdb.o.WSN.YL(
        at com.objectdb.o.STC.e(
        at com.objectdb.o.SHN.F(
        at com.objectdb.o.SHN.w(
        at java.base/

In such cases we have to split the transaction to smaller pieces and commit them more often.

The tricky part is to find out that we have this situation. The NegativeArraySizeException is not very intuitive. We would expect rather something like TransactionTooBigException.

But what would help us most, would be a way to check the current size of the transaction, so we could even prevent the overflow of array index. For example via providing a public method


This may not be possible as it is an interface in javax.jdo package. Maybe it could be solved via a special Query like "objectdb backup" which is used for online backuping.


The stack trace indicates an exception in using recording.

Assuming recording is enable, could you please check whether the exception is still thrown when it is disabled?

ObjectDB Support

You were right. With recording disabled, the exception was not thrown. So any suggestion how it should work correctly with recording.


Could you please try build 2.8.8_04, which may solve the issue?

ObjectDB Support

I tried it with 2.8.8_04 and I got this error:

Caused by: com.objectdb.o.InternalException: Unexpected Server Error
at com.objectdb.o.CLS.v(
at com.objectdb.o.CLS.z(
at com.objectdb.o.CLS.A(
at com.objectdb.o.CST.Y6(
at com.objectdb.o.OBM.aR(
at com.objectdb.o.OBM.aU(
at com.objectdb.o.OBM.aH(
at com.objectdb.jpa.EMImpl.commit(
at eu.extech.db_utils.jdo.BasicJDOConnection.commitAndLeaveOpen(
... 10 more
Caused by: java.lang.OutOfMemoryError: Requested array size exceeds VM limit
at com.objectdb.o.FIW.m(
at com.objectdb.o.BYW.h(
at com.objectdb.o.BYW.h(
at com.objectdb.o.RQC.YP(
at com.objectdb.o.WSN.a(
at com.objectdb.o.WSN.Y6(
at com.objectdb.o.STC.e(
at com.objectdb.o.SHN.G(
at com.objectdb.o.SHN.x(
at java.base/

Build 2.8.8_05 includes an additional attempt to fix this exception.

ObjectDB Support

The last version fixed the issue.