Исключение запроса JanusGraph: org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: Не удалось найти тип для идентификатора - PullRequest
0 голосов
/ 20 сентября 2018

Я могу войти в систему и успешно подключиться к серверу tinkerpop, но когда я выполняю гремлин, появляется одно странное исключение: org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: не удалось найти тип для id: 137481,я использую gV (137481), там также выдается исключение, но когда я выполняю gV (137481) .valueMap (true), он возвращает узел, вот результат выполнения gremlin:

[root@docker9 janusgraph-0.2.0-hadoop2]# bin/gremlin.sh
           \,,,/
           (o o)
  -----oOOo-(3)-oOOo-----
  plugin activated: janusgraph.imports
  plugin activated: tinkerpop.server
  plugin activated: tinkerpop.utilities
  SLF4J: Class path contains multiple SLF4J bindings.
  SLF4J: Found binding in [jar:file:/usr/local/janusgraph-0.2.0-hadoop2/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/usr/local/janusgraph-0.2.0-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
  09:51:06 WARN  org.apache.hadoop.util.NativeCodeLoader  - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  plugin activated: tinkerpop.hadoop
  plugin activated: tinkerpop.spark
  plugin activated: tinkerpop.tinkergraph
  gremlin> :remote connect tinkerpop.server conf/remote.yaml session
  ==>Configured cdh-slave1/192.168.66.149:8182-[f699751a-c046-472f-8d84-a22a7897b241]
  gremlin> :remote console
  ==>All scripts will now be sent to Gremlin Server - [cdh-slave1/192.168.66.149:8182]-[f699751a-c046-472f-8d84-a22a7897b241] - type ':remote console' to return to local mode
  gremlin> g
  ==>graphtraversalsource[standardjanusgraph[cassandrathrift:[192.168.66.149]], standard]

gremlin> g.V(137481).valueMap()
==>{}
gremlin> g.V(137481)
Server could not serialize the result requested. Server error - Error during serialization: Could not find type for id: 137481. Note that the class must be serializable by the client and server for proper operation.
Type ':help' or ':h' for help.
Display stack trace? [yN]
gremlin> 
gremlin> g.V(137481).valueMap(true)
==>{id=137481, label=vertex}

Я уверен, что вершина с именем 'uri' = '/ 0/85' уже существует!

gremlin> g.V().has('uri','/0/85').valueMap()
Could not find type for id: 137481
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: Could not find type for id: 137481
at org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:175)
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:497)
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:497)
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)
...