JanusGraph 异常:WebSocketGremlinRequestEncoder must produce at least one message

"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不支持直接赋予这种类型。
 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章