Import database fails on 3.1.0 with export from 3.0.14

I had a box running 3.0.14 with a database I wanted to preserve, so I exported it, moved the .gz to my new box, setup 3.1.0 (cause why not), and tried to import the database. I get the following error:

Impossible to remove the last cluster of class 'ORole' drop the class instead

When I attempted to do just that [“DROP CLASS ORole”] the console just hung. Trying this various times, sometimes the process could be terminated, sometimes it started getting various Java out of memory errors and had to be kill -9’d from another window.

I finally downloaded 3.0.14 on my new box and was able to import with no problems. Let me know if you need more info to repro.

Thanks!

FYI I also downloaded 3.0.31, ran it against the same database, did an export from there, and 3.1.0 still fails to import that file, same error about ORole.

Here’s more of the error if it helps:

Removed 0 classes.
Importing database info...OK
Importing clusters...
- Creating cluster 'internal'...OK, assigned id=0
- Creating cluster 'default'...OK, assigned id=3
- Creating cluster 'orole'...Error on database import happened just before line 0, column 462
com.orientechnologies.orient.core.exception.ODatabaseException:  Impossible to remove the last cluster of class 'ORole' drop the class instead
        at com.orientechnologies.orient.core.metadata.schema.OClassEmbedded.removeClusterId(OClassEmbedded.java:557)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.dropCluster(ODatabaseDocumentAbstract.java:856)
        at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importClusters(ODatabaseImport.java:982)
        at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:177)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:2055)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:451)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:287)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:142)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:130)

Error: com.orientechnologies.orient.core.exception.ODatabaseException:  Impossible to remove the last cluster of class 'ORole' drop
the class instead

Hi @Matrix

Thank you very much for reporting, I’m checking it now.
In the meantime, could you please open an issue here https://github.com/orientechnologies/orientdb/issues

Thanks

Luigi

Hey @Matrix and @luigidellaquila,

I also experienced this problem trying to import a database from OrientDB 3.0.30.
Thanks for looking into it.
I opened the issue on github and referenced this topic.

Jeff

Hi all,

The issue should be fixed in latest snapshot, the fix will be released with 3.1.1

Thanks

Luigi