Neo4j到OrientDB无法创建顶点

时间:2016-02-11 21:30:24

标签: orientdb-2.1

我正在尝试从Neo4J(neo4-shell)导入数据并加载到OrientDB(gremlin.sh)。但是,由于以下原因,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>
&#13;
&#13;
&#13;

2 个答案:

答案 0 :(得分:0)

您使用的是哪个OrientDB版本?

OrientDB有一个架构,所以它试图自动创建顶点和边缘类。您可以使用非交易图表:g = new com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx();

答案 1 :(得分:0)

谢谢Luca快速回复。它仍然没有帮助。看起来使用gremlin从neo到orient的负载不会创建顶点。但是,当我创建数据库并从相同的GraphML文件导入相同的数据时,它只是没有错误并且导入了所有数据。然后我比较了neo和orient两个图形UI接近相似的视图,但是neo显示了所有对象(节点,关系......)的属性,但是orient没有明确地向它们显示任何属性。 orient是否隐含地维护属性?