【发布时间】:2017-11-22 12:49:08
【问题描述】:
我正在尝试使用 tinkerpop 的 gremlin-server。我无法使用 neo4j 启动 gremlin 服务器。
文档说。
请注意,TinkerPop 在其发行版中不包含 Neo4j 依赖项。要使用此文件,请确保将 Neo4j 依赖项安装到 Gremlin Server 的路径 gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin 3.y.z
我已经使用 :install 安装了 neo4j-gremlin,因为据说 -i 已被弃用。
仍然,我收到以下错误,在以下命令中
.\bin\gremlin-server.bat .\conf\gremlin-server-neo4j.yaml
错误
[WARN] DefaultGraphManager - Graph [graph] configured at [conf/neo4j-empty.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not find [org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph] - Ensure that the jar is in the classpath
java.lang.RuntimeException: GraphFactory could not find [org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph] - Ensure that the jar is in the classpath
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:63)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$new$0(DefaultGraphManager.java:57)
at java.util.LinkedHashMap$LinkedEntrySet.forEach(Unknown Source)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.<init>(DefaultGraphManager.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:105)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:84)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:111)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:355)
[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-*
Exception in thread "main" java.lang.IllegalStateException: java.lang.ClassNotFoundException: org.apache.tinkerpop.gremlin.neo4j.jsr223.Neo4jGremlinPlugin
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.initializeGremlinScriptEngineManager(GremlinExecutor.java:444)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.<init>(GremlinExecutor.java:103)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.<init>(GremlinExecutor.java:72)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor$Builder.create(GremlinExecutor.java:586)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:157)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:84)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:111)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:355)
Caused by: java.lang.ClassNotFoundException: org.apache.tinkerpop.gremlin.neo4j.jsr223.Neo4jGremlinPlugin
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.initializeGremlinScriptEngineManager(GremlinExecutor.java:407)
... 7 more
【问题讨论】:
-
您的
GREMLIN_SERVER_INSTALL/ext目录中有什么?你看到neo4j目录和相关文件了吗?另外,您提到使用gremlin-server.sh,但随后还指定使用.bat启动-这是Windows 环境还是其他环境? -
我使用的是Windows环境。我在 /ext 文件夹中找不到 neo4j 目录。但是这些文件安装在 Gremlin 控制台中。从控制台目录到服务器目录的简单复制就是修复。感谢您的指导。
-
您是说
gremlin.bat :install将neo4j jar 放在GREMLIN_SERVER_INSTALL/ext以外的目录中吗? -
gremlin-server.bat :install根本不起作用。那就是问题所在。这就是为什么我无法将 neo4j 依赖项安装到 gremlin 服务器中。所以,我试图从控制台端安装 neo4j 并且成功了。然后我将 neo4j 文件夹从 gremlin 控制台复制到服务器
标签: neo4j gremlin gremlin-server