2016-02-11 109 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是否隐式维护属性?