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不支持直接賦予這種類型。
 

 

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