Neo4j问题汇总

Neo4j导入数据报错

使用USING PERIODIC COMMIT防止内存条溢出

Executing queries that use periodic commit in an open transaction is not possible.

Neo4j4.0版本以上,USING PERIODIC COMMIT 前必须加上:auto。
另外USING PERIODIC COMMIT这条语句不能单独存在,要和 LoadCSVQuery一起才是符合语法的。

Neo4j启动报错

2021-03-20 14:51:23.493+0000 INFO  Starting...
2021-03-20 14:51:26.228+0000 INFO  ======== Neo4j 4.2.4 ========
2021-03-20 14:51:37.684+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address.
java.lang.RuntimeException: Error starting Neo4j database server at D:\neo4j-community-4.2.4-windows\data\databases
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:207) ~[neo4j-4.2.4.jar:4.2.4]
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:163) ~[neo4j-4.2.4.jar:4.2.4]
        at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) ~[neo4j-4.2.4.jar:4.2.4]
        at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:134) [neo4j-4.2.4.jar:4.2.4]
        at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:90) [neo4j-4.2.4.jar:4.2.4]
        at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35) [neo4j-4.2.4.jar:4.2.4]
2021-03-20 14:51:37.708+0000 INFO  Neo4j Server shutdown initiated by request
2021-03-20 14:51:37.708+0000 INFO  Stopped.

类似于这种情况,我尝试了各种方式:

  • 如果你是安装neo4j初始化阶段就报这个错误:
    • java版本与neo4j的版本不匹配
  • 使用阶段出现该问题
    • 可以把databases下的所有文件删掉

避免不必要的问题

下载Neo4j的最新版本和JDK的最新版本,除了内存吃的多点,没有别的坏处。

调动出现问题

我使用的是Github 3D 知识图谱评分最高的项目
按照文档,依次导入数据,最后调用数据显示知识图谱,然而此时出现了问题:

Error: Unknown Bolt protocol version: 0
at new n (neo4j-color-min.js:17)
at t (neo4j-color-min.js:17)
at l._ch.onmessage (neo4j-color-min.js:18)
at WebSocket._ws.onmessage (neo4j-color-min.js:18)

这个原因是因为neo4j的版本过高,作者使用的驱动已经不能支持

the reason for this error is that v4.1 of the driver supports Bolt versions 2+, and Neo4j 3.2.X only uses Bolt v1. Apologies as we should have included this in the changelog.

You have a couple of options. You could upgrade your Neo4j version to 3.3.X, or ideally, 3.5 since the last version in the 3 series will benefit from long term support. Or simply keep using the 4.0.X drivers series which is still supported.

链接https://github.com/neo4j/neo4j-javascript-driver/issues/595

你可能感兴趣的:(知识图谱)