0

Windows 10 和 Neo4j 桌面 1.4.9、Java 17。

每次我尝试转储数据库时,都会在 Neo4j Desktop 中收到以下错误。 在此处输入图像描述

我检查了 Neo4jDesktop 日志。

[2021-11-21 18:43:55.043] [error] Selecting JVM - Version:11.0.8, Name:OpenJDK 64-Bit Server VM, Vendor:Azul Systems, Inc.
Invalid value for option '--to': cannot convert 'P:\Software\DB\NoSQL\Neo4j_data\relate-data\projects\project-21158abc-7557-4b51-8eb1-19276b14bfda\from-blog-neo4j-Nov-21-2021-18:43:48.dump' to interface java.nio.file.Path (java.nio.file.InvalidPathException: Illegal char <:> at index 128: P:\Software\DB\NoSQL\Neo4j_data\relate-data\projects\project-21158abc-7557-4b51-8eb1-19276b14bfda\from-blog-neo4j-Nov-21-2021-18:43:48.dump)

Dump a database into a single-file archive.

USAGE

neo4j-admin dump [--expand-commands] [--verbose] [--database=<database>]
                 --to=<path>

DESCRIPTION

Dump a database into a single-file archive. The archive can be used by the load
command. <destination-path> can be a file or directory (in which case a file
called <database>.dump will be created). It is not possible to dump a database
that is mounted in a running Neo4j server.

OPTIONS

      --verbose           Enable verbose output.
      --expand-commands   Allow command expansion in config value evaluation.
      --database=<database>
                          Name of the database to dump.
                            Default: neo4j
      --to=<path>         Destination (file or folder) of database dump.

当我尝试来自 Powershell 的命令时,它给出了有关 JVM 版本的错误,并要求更改 JDK:

Selecting JVM - Version:17.0.1, Name:OpenJDK 64-Bit Server VM, Vendor:Oracle Corporation
WARNING! You are using an unsupported Java runtime.
* Please use Oracle(R) Java(TM) 11, OpenJDK(TM) 11 to run Neo4j.
* Please see https://neo4j.com/docs/ for Neo4j installation instructions.
OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
Exception in thread "main" java.lang.LinkageError: Cannot to link java.nio.DirectByteBuffer
        at org.neo4j.internal.unsafe.UnsafeUtil.<clinit>(UnsafeUtil.java:124)
        at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.verifyHacks(MuninnPageCache.java:397)
        at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.<init>(MuninnPageCache.java:369)
        at org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory.createPageCache(ConfiguringPageCacheFactory.java:104)
        at org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory.getOrCreatePageCache(ConfiguringPageCacheFactory.java:86)
        at org.neo4j.kernel.recovery.Recovery.getPageCache(Recovery.java:478)
        at org.neo4j.kernel.recovery.Recovery.isRecoveryRequired(Recovery.java:210)
        at org.neo4j.kernel.recovery.Recovery.isRecoveryRequired(Recovery.java:168)
        at org.neo4j.commandline.dbms.DumpCommand.checkRecoveryState(DumpCommand.java:182)
        at org.neo4j.commandline.dbms.DumpCommand.checkDbState(DumpCommand.java:170)
        at com.neo4j.commandline.dbms.EnterpriseDumpCommand.checkDbState(EnterpriseDumpCommand.java:36)
        at org.neo4j.commandline.dbms.DumpCommand.execute(DumpCommand.java:113)
        at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:71)
        at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:34)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.neo4j.cli.AdminTool.execute(AdminTool.java:89)
        at org.neo4j.cli.AdminTool.main(AdminTool.java:67)
        Suppressed: java.lang.LinkageError: Could not get Throwable message field
                at org.neo4j.internal.helpers.Exceptions.<clinit>(Exceptions.java:239)
                at org.neo4j.kernel.impl.scheduler.CentralJobScheduler.shutdown(CentralJobScheduler.java:271)
                at org.neo4j.kernel.impl.scheduler.CentralJobScheduler.close(CentralJobScheduler.java:282)
                at org.neo4j.kernel.recovery.Recovery.isRecoveryRequired(Recovery.java:209)
                ... 16 more
        Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @2b552920
                at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
                at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
                at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
                at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
                at org.neo4j.internal.helpers.Exceptions.<clinit>(Exceptions.java:235)
                ... 19 more
Caused by: java.lang.IllegalAccessException: module java.base does not open java.nio to unnamed module @2b552920
        at java.base/java.lang.invoke.MethodHandles.privateLookupIn(MethodHandles.java:259)
        at org.neo4j.internal.unsafe.UnsafeUtil.<clinit>(UnsafeUtil.java:107)

**************降级到Java 11 降级后(只是将环境变量指向jdk 11),neo4j-admin转储命令有效,但Neo4j桌面仍然无法转储,错误在日志中是相同的。

4

1 回答 1

0

几个建议:

你的路径不正确吗?我在活动数据库文件夹中使用了一个目录。我只是在 bin、plugin、import 和 data 文件夹旁边创建了一个转储文件夹。

您从 bin 文件夹执行命令。

需要停止数据库。

于 2021-11-23T13:41:51.507 回答