求助:导入数据后启动服务报错 org.neo4j.kernel.impl.core.NonUniqueTokenException
发布于 5 年前 作者 dxy1986 1535 次浏览 来自 问答

Neo4j 3.5.7版本,使用官方批量导入工具neo4j-admin,导入节点和关系,导入语句是

bin/neo4j-admin import --database mljr.db --nodes “person_nodes_header.csv/person_nodes.csv” --relationships /person_roles_header.csv/person_roles.csv" --ignore-extra-columns=true --ignore-duplicate-nodes=true --ignore-missing-nodes=true

导入时是正常的,但启动数据库服务时就报错

org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component ‘org.neo4j.server.database.LifecycleManagingDatabase@72ab05ed’ was successfully initialized, but failed to start. Please see the attached cause exception “The PropertyKey “role” is not unique, it existed with id=0 before being added with id=1.”.

role是关系中的一个属性,为啥这个会有unique的说法呢,我试过两个节点间插入两行相同关系,比如这样: 43068119032915-1,亲属,1390835-7,RELAT 43068119032915-1,亲属,1390835-7,RELAT 这里“亲属”就是role的值。都是可以正常启动的

恳请大神协助,感谢!

回到顶部