2

我正在尝试使用tinkerpop的 gremlin-server。我无法使用 neo4j 启动 gremlin 服务器。

文件说。

请注意,TinkerPop 在其发行版中不包含 Neo4j 依赖项。要使用此文件,请确保将 Neo4j 依赖项安装到 Gremlin Server 的路径中 gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin 3.yz

我已经使用: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
4

2 回答 2

2

:install是控制台命令。

install是服务器命令。 -i也仍然有效。

于 2017-06-21T15:36:35.150 回答
0

作为 gremlin-python-tutorial github 项目的提交者,我的答案是查看

https://github.com/WolfgangFahl/gremlin-python-tutorial/blob/master/run

脚本。

  version=3.4.3
  plugin=neo4j-gremlin
  gsd=apache-tinkerpop-gremlin-server-${version}
  if [ ! -d $gsd/ext/$plugin ]
  then
    color_msg $blue "installing plugin $plugin"
    $gsd/bin/gremlin-server.sh install org.apache.tinkerpop $plugin $version
  else
    color_msg $green "$plugin plugin already installed"
  fi
  color_msg $blue "starting neo4j gremlin-server ..."
  conf=$(realpath $gsd/conf/gremlin-server-neo4j.yaml)
  $gsd/bin/gremlin-server.sh $conf

http://wiki.bitplan.com/index.php/Gremlin_python#Connecting_to_Gremlin_enabled_graph_databases的 Neo4J 部分,您会找到解释

请不要检查 ext 目录是否包含安装(请参阅上面评论中的 Stephen Mallette 的问题)。

于 2019-09-21T17:19:14.963 回答