An ArrayIndexOutOfBoundsException with nested entities and enhanced entities

#1

We have a new issue like the issue in the forum task http://www.objectdb.com/database/forum/1075.

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:

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

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

    @Override

    public DataTypeImpl getDataType() {
        return toBeModified;
    }

    @Override
    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(JPE.java:168) ~[na:na]
at com.objectdb.o.ERR.f(ERR.java:66) ~[na:na]
at com.objectdb.o.OBC.onObjectDBError(OBC.java:1556) ~[na:na]
at com.objectdb.o.ENT.al(ENT.java:1676) ~[na:na]
at com.objectdb.o.ENT.beforeAccess(ENT.java:1148) ~[na:na]
at com.btc.ep.architecture.bl.internal.dmos.types.ModifierImpl.__odbGet_toBeModified(ModifierImpl.java:1) ~[na:na]
at com.btc.ep.architecture.bl.internal.dmos.types.ModifierImpl.getDataType(ModifierImpl.java:54) ~[na:na]
at com.btc.ep.architecture.bl.internal.dmos.types.ModifierImpl.getDataType(ModifierImpl.java:76) ~[na:na]
at com.btc.ep.architecture.bl.internal.dmos.types.AccessPathImpl.normalizeAccessTokens(AccessPathImpl.java:139) ~[na:na]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
at com.objectdb.o.MMM.J(MMM.java:630) ~[na:na]
at com.objectdb.o.TYT.b(TYT.java:45) ~[na:na]
at com.objectdb.o.ENT.beforeAccess(ENT.java:1145) ~[na:na]
... 34 common frames omitted
#2

Are nested embedded objects involved here too?

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

ObjectDB Support
#3

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.

#4

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

ObjectDB Support
#5

Hello,
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.

#6

Hello,

just a additional comment:

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

#7

Thanks for the update.

ObjectDB Support

Reply