Gremlin Driver Cannot Deserialize Response from Germlin Servier Running Bitsy Database
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm running a gremlin server with bitsy using the conf and properties file given in the github repo (https://github.com/lambdazen/bitsy/tree/master/src/test/resources/gremlin-server). I have, of course, changed dbPath
to an appropriate path.
My client is a kotlin application running gremlin console. I have no problem executing queries that result in string or map values, for example:
val encodedPasswd = getg().V().has("user", "login", login).values<String>("password").next()
However, when attempting to get vertices from queries:
val user = getg().V().has("user", "login", login).next()
I get a deserialization error:
[gremlin-driver-loop-1] WARN org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0 - Response [PooledUnsafeDirectByteBuf(ridx: 7446, widx: 7446, cap: 7446)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.
org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.apache.tinkerpop.gremlin.driver.message.ResponseMessage` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (byte)"{"requestId":"5e78c0ba-64d2-4b31-8b04-262c3fa2b3b8","status":{"message":"Error during serialization: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bitsy.store.VertexBean["id"])","code":599,"attributes":{"@type":"g:Map","@value":["stackTrace","org.apache.tinkerpop.gremlin.driver.ser.SerializationException: org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bi"[truncated 6946 bytes]; line: 1, column: 2]
at org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1451)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1027)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1297)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserialize(GraphSONTypeDeserializer.java:212)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserializeTypedFromObject(GraphSONTypeDeserializer.java:86)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1178)
at org.apache.tinkerpop.shaded.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3091)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.deserializeResponse(AbstractGraphSONMessageSerializerV2d0.java:134)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinResponseDecoder.decode(WebSocketGremlinResponseDecoder.java:50)
...
Cluster construction:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.serializer (
GraphSONMessageSerializerV3d0 (
GraphSONMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
.create()
)
)
.create()
and traversal source construction:
fun getg() : GraphTraversalSource {
return EmptyGraph.instance().traversal().withRemote(DriverRemoteConnection.using(cluster))
}
Relevant parts of my gradle:
dependencies {
...
implementation('org.apache.tinkerpop:gremlin-driver:3.3.4')
implementation("com.lambdazen.bitsy:bitsy:3.1.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+")
}
Why can't the driver deserialise messages from the server? What do I change to allow it to?
serialization kotlin gremlin tinkerpop3 bitsy
add a comment |
I'm running a gremlin server with bitsy using the conf and properties file given in the github repo (https://github.com/lambdazen/bitsy/tree/master/src/test/resources/gremlin-server). I have, of course, changed dbPath
to an appropriate path.
My client is a kotlin application running gremlin console. I have no problem executing queries that result in string or map values, for example:
val encodedPasswd = getg().V().has("user", "login", login).values<String>("password").next()
However, when attempting to get vertices from queries:
val user = getg().V().has("user", "login", login).next()
I get a deserialization error:
[gremlin-driver-loop-1] WARN org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0 - Response [PooledUnsafeDirectByteBuf(ridx: 7446, widx: 7446, cap: 7446)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.
org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.apache.tinkerpop.gremlin.driver.message.ResponseMessage` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (byte)"{"requestId":"5e78c0ba-64d2-4b31-8b04-262c3fa2b3b8","status":{"message":"Error during serialization: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bitsy.store.VertexBean["id"])","code":599,"attributes":{"@type":"g:Map","@value":["stackTrace","org.apache.tinkerpop.gremlin.driver.ser.SerializationException: org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bi"[truncated 6946 bytes]; line: 1, column: 2]
at org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1451)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1027)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1297)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserialize(GraphSONTypeDeserializer.java:212)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserializeTypedFromObject(GraphSONTypeDeserializer.java:86)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1178)
at org.apache.tinkerpop.shaded.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3091)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.deserializeResponse(AbstractGraphSONMessageSerializerV2d0.java:134)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinResponseDecoder.decode(WebSocketGremlinResponseDecoder.java:50)
...
Cluster construction:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.serializer (
GraphSONMessageSerializerV3d0 (
GraphSONMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
.create()
)
)
.create()
and traversal source construction:
fun getg() : GraphTraversalSource {
return EmptyGraph.instance().traversal().withRemote(DriverRemoteConnection.using(cluster))
}
Relevant parts of my gradle:
dependencies {
...
implementation('org.apache.tinkerpop:gremlin-driver:3.3.4')
implementation("com.lambdazen.bitsy:bitsy:3.1.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+")
}
Why can't the driver deserialise messages from the server? What do I change to allow it to?
serialization kotlin gremlin tinkerpop3 bitsy
add a comment |
I'm running a gremlin server with bitsy using the conf and properties file given in the github repo (https://github.com/lambdazen/bitsy/tree/master/src/test/resources/gremlin-server). I have, of course, changed dbPath
to an appropriate path.
My client is a kotlin application running gremlin console. I have no problem executing queries that result in string or map values, for example:
val encodedPasswd = getg().V().has("user", "login", login).values<String>("password").next()
However, when attempting to get vertices from queries:
val user = getg().V().has("user", "login", login).next()
I get a deserialization error:
[gremlin-driver-loop-1] WARN org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0 - Response [PooledUnsafeDirectByteBuf(ridx: 7446, widx: 7446, cap: 7446)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.
org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.apache.tinkerpop.gremlin.driver.message.ResponseMessage` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (byte)"{"requestId":"5e78c0ba-64d2-4b31-8b04-262c3fa2b3b8","status":{"message":"Error during serialization: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bitsy.store.VertexBean["id"])","code":599,"attributes":{"@type":"g:Map","@value":["stackTrace","org.apache.tinkerpop.gremlin.driver.ser.SerializationException: org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bi"[truncated 6946 bytes]; line: 1, column: 2]
at org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1451)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1027)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1297)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserialize(GraphSONTypeDeserializer.java:212)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserializeTypedFromObject(GraphSONTypeDeserializer.java:86)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1178)
at org.apache.tinkerpop.shaded.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3091)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.deserializeResponse(AbstractGraphSONMessageSerializerV2d0.java:134)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinResponseDecoder.decode(WebSocketGremlinResponseDecoder.java:50)
...
Cluster construction:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.serializer (
GraphSONMessageSerializerV3d0 (
GraphSONMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
.create()
)
)
.create()
and traversal source construction:
fun getg() : GraphTraversalSource {
return EmptyGraph.instance().traversal().withRemote(DriverRemoteConnection.using(cluster))
}
Relevant parts of my gradle:
dependencies {
...
implementation('org.apache.tinkerpop:gremlin-driver:3.3.4')
implementation("com.lambdazen.bitsy:bitsy:3.1.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+")
}
Why can't the driver deserialise messages from the server? What do I change to allow it to?
serialization kotlin gremlin tinkerpop3 bitsy
I'm running a gremlin server with bitsy using the conf and properties file given in the github repo (https://github.com/lambdazen/bitsy/tree/master/src/test/resources/gremlin-server). I have, of course, changed dbPath
to an appropriate path.
My client is a kotlin application running gremlin console. I have no problem executing queries that result in string or map values, for example:
val encodedPasswd = getg().V().has("user", "login", login).values<String>("password").next()
However, when attempting to get vertices from queries:
val user = getg().V().has("user", "login", login).next()
I get a deserialization error:
[gremlin-driver-loop-1] WARN org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0 - Response [PooledUnsafeDirectByteBuf(ridx: 7446, widx: 7446, cap: 7446)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.
org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.apache.tinkerpop.gremlin.driver.message.ResponseMessage` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (byte)"{"requestId":"5e78c0ba-64d2-4b31-8b04-262c3fa2b3b8","status":{"message":"Error during serialization: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bitsy.store.VertexBean["id"])","code":599,"attributes":{"@type":"g:Map","@value":["stackTrace","org.apache.tinkerpop.gremlin.driver.ser.SerializationException: org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: com.lambdazen.bi"[truncated 6946 bytes]; line: 1, column: 2]
at org.apache.tinkerpop.shaded.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1451)
at org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1027)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1297)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserialize(GraphSONTypeDeserializer.java:212)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeDeserializer.deserializeTypedFromObject(GraphSONTypeDeserializer.java:86)
at org.apache.tinkerpop.shaded.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1178)
at org.apache.tinkerpop.shaded.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
at org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3091)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0.deserializeResponse(AbstractGraphSONMessageSerializerV2d0.java:134)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinResponseDecoder.decode(WebSocketGremlinResponseDecoder.java:50)
...
Cluster construction:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.serializer (
GraphSONMessageSerializerV3d0 (
GraphSONMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
.create()
)
)
.create()
and traversal source construction:
fun getg() : GraphTraversalSource {
return EmptyGraph.instance().traversal().withRemote(DriverRemoteConnection.using(cluster))
}
Relevant parts of my gradle:
dependencies {
...
implementation('org.apache.tinkerpop:gremlin-driver:3.3.4')
implementation("com.lambdazen.bitsy:bitsy:3.1.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+")
}
Why can't the driver deserialise messages from the server? What do I change to allow it to?
serialization kotlin gremlin tinkerpop3 bitsy
serialization kotlin gremlin tinkerpop3 bitsy
asked Jan 4 at 16:54
EllEll
1,80542750
1,80542750
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I'm not completely sure, but I'm guessing that Bitsy lacks full support for GraphSON 3.0. If you look at its IoRegistry
implementation it registers no custom serializers for GraphSON (just for Gryo):
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/BitsyIoRegistryV3d0.java
I assume that's the reason why you get a serialization error. If you switch to just using Gryo (which is probably recommended to some extent since you are on the JVM with Kotlin) I imagine you won't have this problem.
Note that your Cluster
object definition is not configuring the way you expect either. By calling serializer()
twice (i.e. once for Gryo and once for GraphSON) you actually overwrite the Gryo configuration and simply configure the object to work with GraphSON.
So, I think you would just do this:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.create()
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54043097%2fgremlin-driver-cannot-deserialize-response-from-germlin-servier-running-bitsy-da%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm not completely sure, but I'm guessing that Bitsy lacks full support for GraphSON 3.0. If you look at its IoRegistry
implementation it registers no custom serializers for GraphSON (just for Gryo):
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/BitsyIoRegistryV3d0.java
I assume that's the reason why you get a serialization error. If you switch to just using Gryo (which is probably recommended to some extent since you are on the JVM with Kotlin) I imagine you won't have this problem.
Note that your Cluster
object definition is not configuring the way you expect either. By calling serializer()
twice (i.e. once for Gryo and once for GraphSON) you actually overwrite the Gryo configuration and simply configure the object to work with GraphSON.
So, I think you would just do this:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.create()
add a comment |
I'm not completely sure, but I'm guessing that Bitsy lacks full support for GraphSON 3.0. If you look at its IoRegistry
implementation it registers no custom serializers for GraphSON (just for Gryo):
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/BitsyIoRegistryV3d0.java
I assume that's the reason why you get a serialization error. If you switch to just using Gryo (which is probably recommended to some extent since you are on the JVM with Kotlin) I imagine you won't have this problem.
Note that your Cluster
object definition is not configuring the way you expect either. By calling serializer()
twice (i.e. once for Gryo and once for GraphSON) you actually overwrite the Gryo configuration and simply configure the object to work with GraphSON.
So, I think you would just do this:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.create()
add a comment |
I'm not completely sure, but I'm guessing that Bitsy lacks full support for GraphSON 3.0. If you look at its IoRegistry
implementation it registers no custom serializers for GraphSON (just for Gryo):
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/BitsyIoRegistryV3d0.java
I assume that's the reason why you get a serialization error. If you switch to just using Gryo (which is probably recommended to some extent since you are on the JVM with Kotlin) I imagine you won't have this problem.
Note that your Cluster
object definition is not configuring the way you expect either. By calling serializer()
twice (i.e. once for Gryo and once for GraphSON) you actually overwrite the Gryo configuration and simply configure the object to work with GraphSON.
So, I think you would just do this:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.create()
I'm not completely sure, but I'm guessing that Bitsy lacks full support for GraphSON 3.0. If you look at its IoRegistry
implementation it registers no custom serializers for GraphSON (just for Gryo):
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/BitsyIoRegistryV3d0.java
I assume that's the reason why you get a serialization error. If you switch to just using Gryo (which is probably recommended to some extent since you are on the JVM with Kotlin) I imagine you won't have this problem.
Note that your Cluster
object definition is not configuring the way you expect either. By calling serializer()
twice (i.e. once for Gryo and once for GraphSON) you actually overwrite the Gryo configuration and simply configure the object to work with GraphSON.
So, I think you would just do this:
var cluster = Cluster.build()
.serializer (
GryoMessageSerializerV3d0 (
GryoMapper.build()
.addRegistry(BitsyIoRegistryV3d0.instance())
)
)
.create()
answered Jan 7 at 15:12
stephen mallettestephen mallette
27.1k33182
27.1k33182
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54043097%2fgremlin-driver-cannot-deserialize-response-from-germlin-servier-running-bitsy-da%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown