Issue with compile time enhancement

#1

I have an entity library which I have integrated build time enhancement in.  The enhancer reports it has processed all of my persistent classes.  When I attempt to run a Bootstrap process with this library I get the error shown below.  The entity referenced in the error (Terms) is listed as having been enhanced.

I am running with ObjectDB in embedded mode via a reference to a persistence unit also shown below.

Please let me know if you need any additional information to diagnose this problem.

Thanks,

Joel

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.AbstractMethodError: com.paceap.eden.jpa.main.Terms.__odbGetTracker()Lcom/objectdb/spi/Tracker;
at com.objectdb.o.OBC.az(OBC.java:536)
at com.objectdb.o.OBC.aC(OBC.java:593)
at com.objectdb.o.OBM.bx(OBM.java:308)
at com.objectdb.o.OBM.bx(OBM.java:255)
at com.objectdb.jpa.EMImpl.persist(EMImpl.java:375)
at com.paceap.migrator.eden.BootstrapTerms.loadFile(BootstrapTerms.java:248)
at com.paceap.migrator.eden.BootstrapTerms.loadDefaultTerms(BootstrapTerms.java:85)
at com.paceap.migrator.eden.Migrator.main(Migrator.java:486)
... 6 more

<persistence-unit name="EdenServerObjectDBEmbedded">
        <provider>com.objectdb.jpa.Provider</provider>
        <mapping-file>META-INF/orm.xml</mapping-file>
        <exclude-unlisted-classes>false</exclude-unlisted-classes>
        <properties>
            <property name="javax.persistence.jdbc.url" value="objectdb:edenobjectdb.odb"/>
            <property name="javax.persistence.jdbc.username" value="admin"/>
            <property name="javax.persistence.jdbc.password" value="admin"/>
        </properties>
    </persistence-unit>
#2

This exception may be the result of partial enhancement. For example, enhancement of a super entity class without its subclasses.

Enhancement is not required by ObjectDB (although it can improve performance and it is highly recommended), but if you use enhancement all the entity classes in the persistence unit must be enhanced.

ObjectDB Support
#3

Thanks for the quick and helpful reply.  You were exactly correct, I had neglected to include the mapped superclasses that all of my entity classes extend.  Fixing that corrected the problem.

- Joel -

Reply