[2.2-alpha] NPE during database import
Hi, I have just downloaded the 2.2-alpha version. I tried to import a test db of mine and I receive a NPE:
Importing indexes ...
- Index '_BB_Node.id'...OKError on database import happened just before line 69, column 680
java.lang.NullPointerException
at com.orientechnologies.orient.core.index.OSimpleKeyIndexDefinition.serializeFromStream(OSimpleKeyIndexDefinition.java:166)
at com.orientechnologies.orient.core.index.OSimpleKeyIndexDefinition.fromStream(OSimpleKeyIndexDefinition.java:145)
at com.orientechnologies.orient.core.type.ODocumentWrapperNoClass.fromStream(ODocumentWrapperNoClass.java:45)
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importIndexDefinition(ODatabaseImport.java:1411)
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importIndexes(ODatabaseImport.java:1335)
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:406)
at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:1587)
at com.orientechnologies.orient.graph.console.OGremlinConsole.importDatabase(OGremlinConsole.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:382)
at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:247)
at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:136)
at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:65)
Hi @lvca any change to investigate on this? It happens also with 2.1.x and preventing us (with https://github.com/orientechnologies/orientdb/issues/5032) to migrate to the newer version. None of our backuped db can be imported.
I can provide a very small export file.
The problem should be here https://github.com/orientechnologies/orientdb/blame/40dc6c0e59d2a592ef202551f07a934d506ea1ad/core/src/main/java/com/orientechnologies/orient/core/index/OSimpleKeyIndexDefinition.java#L166 Since that into the exported file there is no field "collates".
Have you tried 2.1.3? 2.2 alpha is quite old and unstable
The 2.1.2 had the same issue. Now I will try with the 2.1.3
Hi, I have the same problem with 2.1.3 First I encountered the same problem described here: https://github.com/orientechnologies/orientdb/issues/5032 Then I manually removed from the json the directive "short-name":"E" from this line: {"name":"E","default-cluster-id":10,"cluster-ids":[10],"short-name":"E"} and tried again. I have the NPE:
Importing indexes ...
- Index '_BB_Node.id'...OKError on database import happened just before line 69, column 680
java.lang.NullPointerException
at com.orientechnologies.orient.core.index.OSimpleKeyIndexDefinition.serializeFromStream(OSimpleKeyIndexDefinition.java:166)
at com.orientechnologies.orient.core.index.OSimpleKeyIndexDefinition.fromStream(OSimpleKeyIndexDefinition.java:145)
at com.orientechnologies.orient.core.type.ODocumentWrapperNoClass.fromStream(ODocumentWrapperNoClass.java:45)
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importIndexDefinition(ODatabaseImport.java:1490)
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importIndexes(ODatabaseImport.java:1413)
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:434)
at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:1711)
at com.orientechnologies.orient.graph.console.OGremlinConsole.importDatabase(OGremlinConsole.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:392)
at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:253)
at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:142)
at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:64)
Old releases didn't have neither "collate" nor "collates" fields. Fixed in 2.1.x branch.
Thanks, and what about #5032?
@giastfader is #5032 related to this issue?
The #5032 prevents to load a backup made with an older version of OrientDB. As the matter of fact I had to manually modify the exported JSON to by pass that problem, and eventually found this one