无法在gremlin控制台中使用system.graphs()列出图形

无法在gremlin控制台中使用system.graphs()列出图形,gremlin,janusgraph,Gremlin,Janusgraph,所以我开始学习janusgraph和gremlin。我按照这个指南安装并在图形上进行了一些遍历。现在,我想用system.graphs列出cassandra数据库中的所有图形。我遇到一个错误: No such property: system for class: Script14 Type ':help' or ':h' for help. Display stack trace? [yN]y org.apache.tinkerpop.gremlin.groovy.plugin.RemoteE

所以我开始学习janusgraph和gremlin。我按照这个指南安装并在图形上进行了一些遍历。现在,我想用system.graphs列出cassandra数据库中的所有图形。我遇到一个错误:

No such property: system for class: Script14
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: No such property: system for class: Script14
        at org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:175)
        at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
        at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:99)
        at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
        at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:124)
        at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
        at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
        at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:166)
        at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
        at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:478)
我做错了什么?我该如何解决这个问题?

没有关于Gremlin Server或JanusGraph固有的系统对象的概念,这就是为什么会出现此错误的原因。服务器根本不知道变量名所指的是什么

要获取图形名称列表,必须使用JanusGraph的ConfiguredGraphFactory,此时语法为:

ConfiguredGraphFactory.getGraphNames()
您可以在JanusGraph文档中阅读更多关于这方面的内容,或者在您提供的链接中查看“验证JanusGraph部署上的测试数据”部分,并从中获取相关信息。

没有关于Gremlin Server或JanusGraph本机的系统对象的概念,这就是为什么会出现此错误的原因。服务器根本不知道变量名所指的是什么

要获取图形名称列表,必须使用JanusGraph的ConfiguredGraphFactory,此时语法为:

ConfiguredGraphFactory.getGraphNames()
您可以在JanusGraph文档中阅读更多关于这方面的内容,或者在您提供的链接中查看验证JanusGraph部署上的测试数据部分并从中获取