2016-02-11 46 views
0

我想從Neo4J(neo4-shell)導入數據並加載到OrientDB(gremlin.sh)中。然而,OrientDB無法創建頂點,並且由於以下原因似乎失敗。Neo4j到OrientDB不能創建頂點

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>

回答

0
您正在使用哪個版本OrientDB

OrientDB有一個模式,所以它試圖自動創建vertice和邊界類。您可以使用非事務性圖表:g = new com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx();

0

謝謝盧卡的快速回復。它仍然沒有幫助。它看起來使用gremlin從neo到orient的負載不會創建頂點。但是,當我創建數據庫並從相同的GraphML文件導入相同的數據時,它只是無誤地導入所有數據。然後,我比較了neo和orient圖形用戶界面獲取近似類似的視圖,但是neo顯示所有對象(節點,關係..)的屬性,但是orient沒有明確地向他們顯示任何屬性。 Orient是否隱式維護屬性?