691 words

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

#1
2017-11-03 13:08

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.

BoydEdmondson
BoydEdmondson's picture
Joined on 2016-07-08
User Post #64
#2
2017-11-03 13:16

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,876
#3
2017-11-03 15:48

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)

 

BoydEdmondson
BoydEdmondson's picture
Joined on 2016-07-08
User Post #65
#4
2017-11-03 16:18

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,879
#5
2017-11-03 16:23

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.

BoydEdmondson
BoydEdmondson's picture
Joined on 2016-07-08
User Post #66
#6
2017-11-03 17:01

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,880
#7
2017-11-03 17:06

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.)

BoydEdmondson
BoydEdmondson's picture
Joined on 2016-07-08
User Post #67
#8
2017-11-03 19:02

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:  http://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>

 

BoydEdmondson
BoydEdmondson's picture
Joined on 2016-07-08
User Post #68

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel