JanusGraph 异常:WebSocketGremlinRequestEncoder must produce at least one message

谁践踏了优雅 2022-05-15 15:48 328阅读 0赞

“message”: “org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: java.util.concurrent.ExecutionException: io.netty.handler.codec.EncoderException: WebSocketGremlinRequestEncoder must produce at least one message.”

原因:创建Node时,部分属性的value为一个json对象而不是字符串。

建模时请注意:
某个属性的值只能为基本数据类型或字符串类型,如果是一个json类型,例如: “_schema”: [],
在使用addNodes接口创建类型实例时会报下面错误:
org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Class is not registered: com.alibaba.fastjson.JSONArray
Note: To register this class use: kryo.register(com.alibaba.fastjson.JSONArray.class);
janusgraph不支持直接赋予这种类型。

发表评论

表情:
评论列表 (有 0 条评论,328人围观)

还没有评论,来说两句吧...

相关阅读