Neo4j to OrientDB cannot create vertices

85 views Asked by At

I am trying to import data out of Neo4J (neo4-shell) and loading into OrientDB (gremlin.sh). However OrientDB is not able to create Vertices and appear to be failing for following reasons.

gremlin> g.loadGraphML('/tmp/out.graphml');                                                               
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'ACTED_IN' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'DIRECTED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'PRODUCED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'WROTE' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'FOLLOWS' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'REVIEWED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
==>null
gremlin> exit


And data looks like this

<node id="n0" labels=":Movie"><data key="labels">:Movie</data><data key="title">The Matrix</data><data key="released">1999</data><data key="tagline">Welcome to the Real World</data></node>
<node id="n1" labels=":Person"><data key="labels">:Person</data><data key="name">Keanu Reeves</data><data key="born">1964</data></node>
<node id="n2" labels=":Person"><data key="labels">:Person</data><data key="name">Carrie-Anne Moss</data><data key="born">1967</data></node>
<node id="n3" labels=":Person"><data key="labels">:Person</data><data key="name">Laurence Fishburne</data><data key="born">1961</data></node>
<node id="n4" labels=":Person"><data key="labels">:Person</data><data key="name">Hugo Weaving</data><data key="born">1960</data></node>
<node id="n5" labels=":Person"><data key="labels">:Person</data><data key="name">Andy Wachowski</data><data key="born">1967</data></node>
<node id="n6" labels=":Person"><data key="labels">:Person</data><data key="name">Lana Wachowski</data><data key="born">1965</data></node>
<node id="n7" labels=":Person"><data key="labels">:Person</data><data key="name">Joel Silver</data><data key="born">1952</data></node>
<node id="n8" labels=":Person"><data key="labels">:Person</data><data key="name">Emil Eifrem</data><data key="born">1978</data></node>
<node id="n9" labels=":Movie"><data key="labels">:Movie</data><data key="title">The Matrix Reloaded</data><data key="released">2003</data><data key="tagline">Free your mind</data></node>

2

There are 2 answers

0
user5843666 On

Thank you Luca for quick reply. It still did not help. It appears the load from neo to orient using gremlin does not create vertices. However when I created DB and imported same data from same GraphML file it just takes it without errors and all data was imported. Then I compared both neo and orient Graph UI gets near similar view, however neo shows properties for all objects (nodes, relationships..) but orient does not show them any property explicitly. Does orient maintains properties implicitly?

0
Lvca On

Which OrientDB version are you using?

OrientDB has a schema, so it's trying to auto-create vertice and edge classes. You could use a Non Transactional graph with: g = new com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx();