[BUG] Gremlin optional connection properties aren't passed to sql SchemaHelper
Closed this issue · 2 comments
Describe the bug
I need to set a GRAPHSON serializer in the JDBC connection.
Here is an example url
jdbc:neptune:sqlgremlin://127.0.0.1;port=8182;authScheme=None;enableSsl=false;serializer=GRAPHSON_V3D0
There are two problems with this:
- Typo in the GremlinQueryExecutor
- SQL use a separate connection to grab schema and all optional connection properties aren't passed to the SchemaHelperGremlinDataModel connection. So now way to properly configure ut
- **Have you validated that this is not currently reported in
Steps to Reproduce
- Disable GraphBinaryMessageSerializerV1 on gremlin server for better debuggability
2.use DBeaver to connect to gremlin server with this url: jdbc:neptune:sqlgremlin://127.0.0.1;port=8182;authScheme=None;enableSsl=false;serializer=GRAPHSON_V3D0
Expected behavior
it should work
Screenshots
1/12/15 15:53:46 [gremlin-driver-loop-2]
ERROR driver.Handler$GremlinResponseHandler: Could not process the response
io.netty.handler.codec.DecoderException: org.apache.tinkerpop.gremlin.driver.ser.SerializationException: The most significant bit should be set according to the format
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
at io.netty.handler.codec.http.websocketx.Utf8FrameValidator.channelRead(Utf8FrameValidator.java:82)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.tinkerpop.gremlin.driver.ser.SerializationException: The most significant bit should be set according to the format
at org.apache.tinkerpop.gremlin.driver.ser.binary.ResponseMessageSerializer.readValue(ResponseMessageSerializer.java:47)
at org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1.deserializeResponse(GraphBinaryMessageSerializerV1.java:173)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinResponseDecoder.decode(WebSocketGremlinResponseDecoder.java:47)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinResponseDecoder.decode(WebSocketGremlinResponseDecoder.java:35)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
... 33 more
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.CompletionException: io.netty.handler.codec.DecoderException: org.apache.tinkerpop.gremlin.driver.ser.SerializationException: The most significant bit should be set according to the format
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.twilmes.sql.gremlin.adapter.converter.schema.SqlSchemaGrabber.getSchema(SqlSchemaGrabber.java:65)
at software.aws.neptune.common.gremlindatamodel.SchemaHelperGremlinDataModel.getGremlinGraphSchema(SchemaHelperGremlinDataModel.java:105)
at software.aws.neptune.common.gremlindatamodel.MetadataCache.updateGremlinCache(MetadataCache.java:76)
at software.aws.neptune.common.gremlindatamodel.MetadataCache.updateCacheIfNotUpdated(MetadataCache.java:89)
at software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.getGremlinSqlConverter(SqlGremlinQueryExecutor.java:92)
at software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.runQuery(SqlGremlinQueryExecutor.java:173)
at software.aws.neptune.jdbc.utilities.QueryExecutor.runCancellableQuery(QueryExecutor.java:166)
at software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.executeQuery(SqlGremlinQueryExecutor.java:166)
at software.aws.neptune.jdbc.Statement.executeQuery(Statement.java:435)
The PR request is more a prototype then final solution. Is it the right way to fix the problem?
Resolved in #250.