OEM: Too many persistable types (>10) - exceeds evaluation limit (error 1011)

#1

I might also be seeing a failure of my OEM license when using ObjectDB 2.7.2_03.

[ObjectDB 2.7.2_03] javax.jdo.JDODataStoreException
Too many persistable types (>10) - exceeds evaluation limit (error 1011)
 at com.objectdb/com.objectdb.jdo.JdoQuery.compile(JdoQuery.java:734)

I will have to investigate more tomorrow (but I want to submit this now due to timezone differences and weekend for perhaps faster response/resolution if it is an ObjectDB issue).

The test runs fine on the computer that creates my application (with ObjectDB Enhanced classes) but my application fails with the error above when I move my application to another computer.

#2

There were no updates to licences and activations in recent versions.

Please make sure that your classes are OEM enhanced. See this forum thread.

ObjectDB Support
#3

Thank you for the link to the class enhancing confirmation checking code.  (It helped me find a build order priority issue.  I will also use the technique to put a safety check into our application.)

 

Yet, I STILL see the issue even after confirming that ObjectDB class enhancing has indeed been performed.

 

I have this at the entry to my application:

public static void main(String[] args){
        // todo start
        JdoDatabase jdoDatabase = new JdoDatabase(JdoEntity.toJdoIdDatabase(), "Test");
        if(jdoDatabase instanceof com.objectdb.spi.SignedType) System.out.format("ObjectDB class enhancing HAS been " +
            "performed."); else System.out.format("ERROR!  ObjectDB class enhancing has NOT been performed.");
        // todo end

...

I get the following output when I run on a different computer than the one that is building the application (the computer that is building the application has an ObjectDB OEM Activation code installed).

ObjectDB class enhancing HAS been performed.
[ObjectDB 2.7.2_04] javax.jdo.JDODataStoreException
Too many persistable types (>10) - exceeds evaluation limit (error 1011)
at com.objectdb/com.objectdb.jdo.JdoQuery.compile(JdoQuery.java:734)
at com.unilogical.moxydox.server/com.unilogical.moxydox.server.database.Database.getPersistenceManager(Database.java:1635)
at com.unilogical.moxydox.server/com.unilogical.moxydox.server.database.Database.mayUpdateDatabaseSchema(Database.java:1700)
at com.unilogical.moxydox.server/com.unilogical.moxydox.server.database.Database.startup(Database.java:1538)
at com.unilogical.moxydox.server/com.unilogical.moxydox.server.Main.startOffloadJavaFx(Main.java:522)
at com.unilogical.moxydox.server/com.unilogical.moxydox.server.Main.lambda$start$3(Main.java:337)
at com.unilogical.moxydox.server/com.unilogical.moxydox.server.BackgroundThread.run(BackgroundThread.java:148)

 

#4

The log file should include a more detailed stack trace. Could you please send it?

In addition, if this is a new error on that computer, are there other changes except the ObjectDB version (e.g. Java version)? What happens if you try earlier ObjectDB versions now?

ObjectDB Support
#5

I have attached two ObjectDB logfiles ("debug" level).  The "Works_xxx" file is from the build computer that has no error.  The "Fails_xxx" is from the test computer that throws the "too many persistable types" error.

 

This is a new error on the test computer.  There have been many changes from the previously working application on the test computer.  Java has been upgraded to Java 9.  Modularization of my application and its third party libraries.  This is a JavaPackager built JRE so there are no external influences, just what I have built into the JRE application installer package.

I will try now with ObjectDB 2.7.1 to see if it also show the "too many persistable types" error.

#6

The failed log includes "Building a synthetic Class" messages, such as:

[2017-11-03 09:40:29 #5 type.loader]
Building a synthetic Class for com.unilogical.moxydox.protocol.jdo.JdoEntity

You are not expected to get such messages unless ObjectDB cannot find your entity classes in the classpath. When an entity class is not available to ObjectDB it creates a synthetic class as a replacement. But these synthetic classes are not OEM enhanced and therefore not excluded from the no activation limits.

Try to check what change could cause your enhanced entity classes to be inaccessible to ObjectDB.

ObjectDB Support
#7

Ah.  I will check that, thank you.

 (I will also add a check in my application to try to find JdoEntity class explicitly so I can report an error for myself so ObjectDB does not resort to building synthetic classes.)

(I tried with ObjectDB 2.7.1, and it still fails, as you would expect.)

(Perhaps the reason one computer works and the other doesn't is that one computer has an extra entry in one of its databases so >10 is seen on test computer but <10 is seen on build computer.)

#8

I found the cause.  My newer application (Java 9 modularized) had a package move but I did not update the ObjectDB.conf <Schema> to match, as described here:  https://www.objectdb.com/java/jpa/setting/schema.

Adding an ObjectDB.conf entry as follows corrected the issue:

<schema>
        <package name="com.unilogical.moxydox.protocol.jdo" new-name="com.unilogical.moxydox.protocol.server.jdo">
        </package>
</schema>

 

Reply