An ArrayIndexOutOfBoundsException with nested entities and enhanced entities


We have a new issue like the issue in the forum task

This issue is very important for us, because we want to create a release soon.

ObjectDB version: 2.6.8_06

All our entities are enhanced.

There are nested entities in following hierarchy:

@Access (AccessType.FIELD)
public abstract class ModifierImpl extends DataTypeImpl implements Modifier {

    @ManyToOne (targetEntity = DataTypeImpl.class, cascade = {CascadeType.ALL }, fetch = FetchType.LAZY)
    private DataTypeImpl toBeModified;


    public DataTypeImpl getDataType() {
        return toBeModified;

    public DataTypeImpl getDataType(String accessPath) {
        DataTypeImpl ret = null;
        if (accessPath.isEmpty()) {
            return getDataType();
        if (getDataType() != null) {
            ret = getDataType().getDataType(accessPath);
        return ret;



com.objectdb.o.InternalException: Unexpected internal exception
at com.objectdb.o.JPE.h( ~[na:na]
at com.objectdb.o.ERR.f( ~[na:na]
at com.objectdb.o.OBC.onObjectDBError( ~[na:na]
at ~[na:na]
at com.objectdb.o.ENT.beforeAccess( ~[na:na]
at ~[na:na]
at ~[na:na]
at ~[na:na]
at ~[na:na]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
at com.objectdb.o.MMM.J( ~[na:na]
at com.objectdb.o.TYT.b( ~[na:na]
at com.objectdb.o.ENT.beforeAccess( ~[na:na]
... 34 common frames omitted

Are nested embedded objects involved here too?

Could you please provide a test case as with the previous exception?

ObjectDB Support

No, there are only entities involved.

Have you an idea why this issue occurs?

We try everything to create an example. But maybe you can find more information in the stack-trace and can help to create (fast) a reproducible sceanario.


It looks again as a mismatching enhancement, but it could be anything.

ObjectDB Support

First of all thank you for the try to analyze the error.

We get the error no longer reliably reproduced.

It was reproduceable on one machine of our developers. How unfortunately turns out, the error occurred on this machine only with an 'old' database. In other environments (other developer machine) we get no error (irrespectively of the database).

We see no connection between the database and the enhanced classes. But perhaps, not quite comprehensible, the database was produced by the ObjectDB_2.6.8_05. And then accessed with enhanced classen (version 2.6.8_06).

We hope that something went wrong while enhancing.

If we observe such problem again and can also reproduce, we will contact you again.


Accordingly, we will release our Application with the ObjectDB version 2.6.8_06.



just a additional comment:

We found an error in our 'optimized for daily work' continuous integration build pipeline, which can cause a mismatching enhancement.


Thanks for the update.

ObjectDB Support