Coder Social home page Coder Social logo

aws / amazon-neptune-jdbc-driver Goto Github PK

View Code? Open in Web Editor NEW
23.0 11.0 13.0 27.5 MB

Amazon Neptune JDBC Driver by Amazon Web Services

Home Page: https://aws.amazon.com/neptune/

License: Apache License 2.0

Shell 0.12% Groovy 0.15% Java 99.36% Python 0.24% Dockerfile 0.03% JavaScript 0.09%
graph sql graphdb amazon neptune jdbc gremlin sparql opencypher apache2

amazon-neptune-jdbc-driver's Introduction

JDBC Driver for Amazon Neptune

This driver provides read-only JDBC connectivity for the Amazon Neptune service using SQL, Gremlin, openCypher and SPARQL queries.

Using the Driver

The driver is available on Maven Central. In addition to the regular jar, a shadow/uber/fat jar is also published with the classifier all.

To use the Driver in BI tools, please refer to the documentation below.

To connect to Amazon Neptune using the JDBC driver, the Neptune instance must be available through an SSH tunnel, load balancer, or the JDBC driver must be deployed in an EC2 instance.

SSH Tunnel and host file must be configured before using the drive to connect to Neptune, please see SSH configuration.

Specifications

This driver is compatible with JDBC 4.2 and requires a minimum of Java 8.

Compatibility with AWS Neptune

Engine Release Driver Version
< 1.1.1.0 1.1.0
≥ 1.1.1.0 and < 1.2.0.0 2.0.0+
≥ 1.2.0.0 and < 1.2.1.0 3.0.0+
≥ 1.2.1.0 3.0.2+

Connection URL and Settings

To set up a connection, the driver requires a JDBC connection URL. The connection URL is generally of the form:

jdbc:neptune:[connectionType]://[host];[propertyKey1=value1];[propertyKey2=value2]..;[propertyKeyN=valueN]

A basic example of a connection string is:

jdbc:neptune:sqlgremlin://neptune-example.com;port=8182

Specific requirements for the string can be found below in the specific query language documentation.

Connecting using the DriverManager Interface

If the jar is in the application's classpath, no other configuration is required. The driver can be connected to using the JDBC DriverManager by connecting using an Amazon Neptune connection string.

Below is an example where Neptune is accessible through the endpoint neptune-example.com on port 8182.

Reminder: The Neptune endpoint is only accessible if a SSH tunnel is established to a EC2 instance in the same Amazon VPC as the Neptune cluster.

In this example, the SSH tunnel would have been established by running something similar to the following in a shell:

ssh -i "ec2Access.pem" -L 8182:neptune-example.com:8182 [email protected] -N

The full documentation for how to establish the SSH tunnel can once again be found here.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

void example() {
    String url = "jdbc:neptune:sqlgremlin://neptune-example.com;port=8182";

    Connection connection = DriverManager.getConnection(url);
    Statement statement = connection.createStatement();
    
    connection.close();
}

Refer to the connection string options in the specific query language documentation below for more information about configuring the connection.

For more example applications, see the sample applications.

Graph Query Language Support

SQL

The driver supports a subset of SQL-92 and some common extensions.

To connection to Amazon Neptune using SQL, please see the SQL connection configurations for details about connection string configurations.

Gremlin

Gremlin is a graph traversal language supported by Neptune. To issue Gremlin queries to Neptune though the driver, please see Gremlin connection configurations.

openCypher

openCypher is an open query language for property graph database supported by Neptune. To issue openCypher queries to Neptune though the driver, please see openCypher connection configurations.

SPARQL

SPARQL is an RDF query language supported by Neptune. To issue SPARQL queries to Neptune though the driver, please see SPARQL connection configurations.

Driver Setup in BI Applications

To learn how to set up the driver in various BI tools, instructions are outlined here for:

Troubleshooting

To troubleshoot or debug issues with the JDBC driver, please see the troubleshooting instructions.

Contributing

Because the JDBC driver is available as open source, contribution from the community is encouraged. If you are interested in improving performance, adding new features, or fixing bugs, please see our contributing guidelines.

Building from Source

If you wish to contribute, you will need to build the driver. The requirements to build the driver are very simple, you only need a Java 8 compiler with a runtime environment and you can build and run the driver.

Security Issue Notifications

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public GitHub issue.

Licensing

See the LICENSE file for our project's licensing. We will ask you to confirm the licensing of your contribution.

Copyright

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

amazon-neptune-jdbc-driver's People

Contributors

alexey-temnikov avatar anchouls avatar asarkar avatar cole-greer avatar csolonynka avatar danielmatuki avatar dependabot[bot] avatar jindrichmynarz avatar kenhuuu avatar lyndonbauto avatar ryn5 avatar simonz-bq avatar valentina-bq avatar vkagamlyk avatar xiazcy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-neptune-jdbc-driver's Issues

[BUG] Custom serializer with custom ioRegistry isn't MessageSerializer because of shadow

Describe the bug

Steps to Reproduce

  • Is the JDBC Driver being used in a BI tool?
1. I use 1.1.0 version of driver
2. I use SQL variant (I think it is problem for every language)
3. I connect to Janusgraph server, so I need `ioRegistry` be `JanusGraphIoRegistry`
4. I use gremlin version 3.5.3 in Janusgraph, so I change files in driver, so its compile with this version of gremlin (I also change some import because of it).  
5. 
openjdk version "1.8.0_342"
OpenJDK Runtime Environment (build 1.8.0_342-8u342-b07-0ubuntu1~20.04-b07)
OpenJDK 64-Bit Server VM (build 25.342-b07, mixed mode)

Link to stackoverflow with example code

Problematic code is locate in GremlinConnectionProperties.java (used in GremlinQueryExecutor.java), when driver checks serializer is Object. Because JanusGraphIoRegistry isn't located in shadow, i need import org.apache.tinkerpop.gremlin.driver.MessageSerializer in my script. But because of it, instanceof return false, when we check for MessageSerializer, beсause MessageSerializer in driver is located in shadow.org.apache.tinkerpop.gremlin.driver.MessageSerializer

Expected behavior

I want to be able to add custom serializers with custom ioRegistry

Screenshots

Environment

  • OS: Ubuntu 20.04

Additional Context

I suggest remove in root build.gradle line with relocate 'org.apache.tinkerpop', 'shadow.org.apache.tinkerpop', so that you can easily add custom serializers

[BUG] Serialization errors when attempting to build schema

Describe the bug

When connecting to an AWS Neptune instance through the SSH tunnel, serialization errors occur in shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer when calling databaseMetaData.getColumns(null, null, null, null) as per the example code.

This is without IAM Auth, over SSL.

The hosts file on my system has been modified to include 127.0.0.1 MY-ENDPOINT-URL.

Steps to Reproduce

  • [❌] Is the JDBC Driver being used in a BI tool?

If being used outside of a BI Tool, fill in:

  1. What vesion of the JDBC Driver are you using? 1.1.0
  2. What language variant are you using (SPARQL, Gremlin, openCypher, SQL)? SQL
  3. What database are you connecting to (Amazon Neptune, Neo4J, etc)? AWS Neptune
  4. What engine version of the database are you using? Whatever is currently live on Neptune
  5. What Java version are you using? OpenJDK 17
  6. Please attach a code snippet of the code that is causing the error
package com.company;
import java.sql.*;
import java.util.Properties;

public class Main {
    public static void example() throws SQLException {
        String url = "jdbc:neptune:sqlgremlin://MY-SERVER-ENDPOINT.us-east-1.neptune.amazonaws.com;port=8182";

        final Properties properties = new Properties();
        properties.put("UseEncryption", "true");
        properties.put("LogLevel", "DEBUG");
        properties.put("AuthScheme", "None");

        Connection connection = DriverManager.getConnection(url, properties);
        Statement statement = connection.createStatement();
        DatabaseMetaData databaseMetaData = connection.getMetaData();

        final ResultSet getColumnsResultSet = databaseMetaData.getColumns(null, null, null, null);
        if (!getColumnsResultSet.next()) {
            throw new SQLException(
                    "This graph contains no columns (properties on any nodes with distinct label sets).");
        }

        do {
            // Grab the table name, column name, and data type of column. Look here for more information:
            // https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)
            final String tableName = getColumnsResultSet.getString("TABLE_NAME");
            final String columnName = getColumnsResultSet.getString("COLUMN_NAME");
            final String dataType = getColumnsResultSet.getString("DATA_TYPE");
            System.out.println(tableName + columnName + dataType);
        } while (getColumnsResultSet.next());


        connection.close();
    }

    public static void main(String[] args) {
	// write your code here
        try {
            example();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
  1. If bug occurred during query execution attach the SQL Bug occurs when running above code
  2. Attach debug logs if applicable/possible (please ensure it doesn't contain any sensitive information)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: shadow.io.netty.handler.codec.EncoderException: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=5e20fee2-8917-47ca-a216-db1e25edb9e0, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at shadow.org.twilmes.sql.gremlin.adapter.converter.schema.SqlSchemaGrabber.getSchema(SqlSchemaGrabber.java:65)
	at software.aws.neptune.common.gremlindatamodel.SchemaHelperGremlinDataModel.getGraphSchema(SchemaHelperGremlinDataModel.java:88)
	at software.aws.neptune.common.gremlindatamodel.MetadataCache.updateCache(MetadataCache.java:65)
	at software.aws.neptune.common.gremlindatamodel.MetadataCache.updateCacheIfNotUpdated(MetadataCache.java:80)
	at software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.executeGetColumns(SqlGremlinQueryExecutor.java:117)
	at software.aws.neptune.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:953)
	at com.company.Main.example(Main.java:21)
	at com.company.Main.main(Main.java:43)
Caused by: java.util.concurrent.ExecutionException: shadow.io.netty.handler.codec.EncoderException: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=5e20fee2-8917-47ca-a216-db1e25edb9e0, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at shadow.org.twilmes.sql.gremlin.adapter.converter.schema.SqlSchemaGrabber$RunGremlinQueryVertices.call(SqlSchemaGrabber.java:145)
	at shadow.org.twilmes.sql.gremlin.adapter.converter.schema.SqlSchemaGrabber$RunGremlinQueryVertices.call(SqlSchemaGrabber.java:133)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: shadow.io.netty.handler.codec.EncoderException: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=5e20fee2-8917-47ca-a216-db1e25edb9e0, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong
	at shadow.io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:104)
	at shadow.io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
	at shadow.io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
	at shadow.io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071)
	at shadow.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at shadow.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at shadow.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at shadow.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at shadow.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	... 1 more
Caused by: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=5e20fee2-8917-47ca-a216-db1e25edb9e0, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong
	at shadow.org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinRequestEncoder.encode(WebSocketGremlinRequestEncoder.java:60)
	at shadow.org.apache.tinkerpop.gremlin.driver.handler.WebSocketGremlinRequestEncoder.encode(WebSocketGremlinRequestEncoder.java:38)
	at shadow.io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:89)
	... 9 more
java.sql.SQLException: java.sql.SQLException: Error occurred during schema collection. 'java.util.concurrent.ExecutionException: shadow.io.netty.handler.codec.EncoderException: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=5e20fee2-8917-47ca-a216-db1e25edb9e0, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong'.
	at software.aws.neptune.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:961)
	at com.company.Main.example(Main.java:21)
	at com.company.Main.main(Main.java:43)
Caused by: java.sql.SQLException: Error occurred during schema collection. 'java.util.concurrent.ExecutionException: shadow.io.netty.handler.codec.EncoderException: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=5e20fee2-8917-47ca-a216-db1e25edb9e0, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong'.
	at shadow.org.twilmes.sql.gremlin.adapter.converter.schema.SqlSchemaGrabber.getSchema(SqlSchemaGrabber.java:71)
	at software.aws.neptune.common.gremlindatamodel.SchemaHelperGremlinDataModel.getGraphSchema(SchemaHelperGremlinDataModel.java:88)
	at software.aws.neptune.common.gremlindatamodel.MetadataCache.updateCache(MetadataCache.java:65)
	at software.aws.neptune.common.gremlindatamodel.MetadataCache.updateCacheIfNotUpdated(MetadataCache.java:80)
	at software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.executeGetColumns(SqlGremlinQueryExecutor.java:117)
	at software.aws.neptune.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:953)
	... 2 more

Expected behavior

Expected to build the SQL schema necessary and list the columns

Screenshots

Environment

macOS Monterey, Apple Silicon, IntelliJ IDEA 2021.3.2 CE

Additional Context

This happens on both an empty and a populated graph.

[BUG] Simple SQL query fails in SQL Workbench

Describe the bug

I have the driver configured in SQL Workbench and when I try a simple query

select count(*) from File;

I get back error:

An error occurred when executing the SQL command:
select count(*) from File

Error occurred during schema collection. 'java.util.concurrent.ExecutionException: shadow.io.netty.handler.codec.EncoderException: shadow.org.apache.tinkerpop.gremlin.driver.exception.ResponseException: An error occurred during serialization of this request [RequestMessage{, requestId=e3f911dc-8a81-49f0-b7b8-5f8ee32718de, op='bytecode', processor='traversal', args={gremlin=[[], [V(), label(), dedup()]], aliases={g=g}}}] - it could not be sent to the server - Reason: shadow.org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IllegalArgumentException: Unable to create serializer "shadow.org.apache.tinkerpop.shaded.kryo.serializers.FieldSerializer" for class: java.util.concurrent.atomic.AtomicLong'.
1 statement failed.

Execution time: 4.71s

To my understanding this should be a supported query type

Steps to Reproduce

  • Is the JDBC Driver being used in a BI tool?: no
  • version of JDBC Driver: 1.1.0-all
  • language variant: SQL
  • database: Amazon Neptune
  • database engine version: 1.0.5.1
  • java version: openjdk version "17.0.1" 2021-10-19
  • java code: running SQL Workbench/J Build 128
  • sql code: select count(*) from File;

Expected behavior

Expected SQL Workbench to reply 66400 as that is how many vertices with label "File" there are in my graph.

Screenshots

Environment

  • OS: macOS Big Sur
  • Version 11.6.2
  • jdbc connection string used: jdbc:neptune:sqlgremlin://.eu-west-1.neptune.amazonaws.com;port=8182;authScheme=IAMSigV4
  • AWS credentials in ~/.aws/credentials
  • AWS_PROFILE set in environment
  • SERVICE_REGION set in environment to eu-west-1

Additional Context

[BUG] Broken GROUP BY with renamed table

Describe the bug

When creating an alias for a table other than the table name, GROUP BY stops working

Steps to Reproduce

It was started by writing tests on the develop branch, commit 90feebb

SQL query

runJoinQueryTestResults("SELECT p.name FROM gremlin.person p " +
                "INNER JOIN gremlin.person p1 ON (p.friendsWith_OUT_ID = p1.friendsWith_IN_ID) " +
                "GROUP BY p.name",
        columns("name"),
        rows(r("Tom"), r("Patty"), r("Phil"), r("Susan")));

Error

Error: Unable to group table person.
java.sql.SQLException: Error: Unable to group table person.
	at org.twilmes.sql.gremlin.adapter.util.SqlGremlinError.create(SqlGremlinError.java:131)
	at org.twilmes.sql.gremlin.adapter.util.SqlGremlinError.create(SqlGremlinError.java:177)
	at org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSqlSelectMulti.applyGroupBy(GremlinSqlSelectMulti.java:270)
	at org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSqlSelectMulti.generateTraversal(GremlinSqlSelectMulti.java:215)
	at org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSqlSelect.executeTraversal(GremlinSqlSelect.java:65)
	at org.twilmes.sql.gremlin.adapter.converter.SqlConverter.executeQuery(SqlConverter.java:92)
	at org.twilmes.sql.gremlin.adapter.GremlinSqlBaseTest.runJoinQueryTestResults(GremlinSqlBaseTest.java:118)

Expected behavior

Specified in the test

Environment

  • OS: macOS Big Sur
  • OS Version: 11.5.2
  • openjdk 11.0.9.1 2020-11-04

[BUG]

Describe the bug

Steps to Reproduce

  • Is the JDBC Driver being used in a BI tool?

I am using 1.1.0 version JDBC with SQL language and connect to Janusgraph Server. I use gremlin version 3.5.3(I change code a little bit for it, only some imports) and java 1.8.0 openjdk.

Problem for Janusgraph that id of edge is RelationIdentifier, which is not Comparable. Because of it, you cant write something like g.E().order(__.unfold().id())

Expected behavior

Dont use order(__.unfold().id) by default

Screenshots

Environment

OS: Ubuntu 20.04

Additional Context

I suggest in file GremlinSqlSelectSingle add order to traversal if only driver get ORDER BY in SQL query

[BUG] SSH Tunnel Needs rework

Currently the SSH tunnel has some issues and is poorly documented. It was removed due to this problem, we need to fix it and revive the documentation.

Some details:
When strict host key checking is enabled, there is a weird error

On Tableau Desktop, when i enable strict host key checking but did not modify known hosts file yet, it fails with weird error message. Log shows problem is related to host key checking but error message on Tableau is about not adding driver.

Tableau crashes when strict host key check is disabled.

Also at random times when using SSH tunneling and disabling the strict host ket check causes the tableau to freeze.

SSH Tunnel Docs unclear

The discussion of SSH tunnels is really unclear. If I am running over an SSH tunnel do I also need to give all these parameters to the driver? The sample code in the docs just hangs for me while trying to connect over an SSH tunnel so the docs need to make very explicit when these parameters are needed and why. Having to put pem file info etc into text inside code is not secure.

Establishing a connection manually via a URL could use a concrete example walkthrough when configuring an SSH tunnel.

[BUG] False positive exception on statement close

Describe the bug

Close invokes cancelQuery which dumps out a false positive exception.

2021-12-14 14:07:54.417 FINE 296 [pool-4-thread-15 - s.flush] java.sql.SQLException: Cannot cancel query, it is either completed or has not started.
at software.aws.neptune.jdbc.utilities.SqlError.createSQLException(SqlError.java:154)
at software.aws.neptune.jdbc.utilities.QueryExecutor.cancelQuery(QueryExecutor.java:223)
at software.aws.neptune.jdbc.Statement.close(Statement.java:91)
at jdk.internal.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.onseven.dbvis.jdbc.b.c.b(Z:3273)
at com.onseven.dbvis.jdbc.b.g$_b.call(Z:3572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
SQLException: SQLState(HY008)

[FEATURE] Allow SERVICE_REGION to be a connection property instead of environment variable

  • Have you validated that this is not currently reported in
    limitations or milestones? If so, please link it.

Feature Request Related to a Problem?

No, this is for quality of life.

Describe the Solution

Currently SERVICE_REGION must be set as an environment variable. This is a pain to do with modern mac when environment variables are not loaded into applications without extra work. This should be supported as a connection property.

Describe Alternatives that have been Considered

Launch BI tools through command line is the only alternative.

[FEATURE] Gremlin Adapter Does not Support Column Name Defaults

With the current JDBC Driver setup, you have to return data in a way where it comes as a LinkedHashMap.
This setup allows the JDBC Driver to infer the 'column name' of the data that is received.
There has been community requests to remove this restriction and allow column naming to have default values.

Describe the Solution

Default column names should likely be something like col<i> for i = 0; i < n; i++, however other naming scheme would be considered. The current lock is in the GremlinQueryExecutor

A simple way of fixing this would be to remove the if statement that skips non linked hash maps, and create a way of handling different datatypes with some autogenerated default column names.

[BUG] When combining WHERE and GROUP BY results are incorrect

Describe the bug

It seems like our COUNT operation is not being applied properly when we have filters and groups involved. It seems like results are being filtered out incorrectly and the count is being applied before the filter is complete. The two queries with results attached show the issue.

SELECT country, count(city) FROM airport WHERE (country = 'PH' OR country = 'JP') and elev > 100 group by country;
country COUNT(city)
JP 65

SELECT * FROM airport WHERE (country = 'PH' OR country = 'JP') and elev > 100 order by country;
country route_OUT_ID code longest airport_ID city route_IN_ID lon type contains_IN_ID elev icao region runways lat desc
JP [50957, 50958, 50959, 50960, 50961, 50962] IBR 8860 2404 Omitama [40006, 24317, 12151, 18632, 24447, 32455] 140.414993286 airport [60308, 56806] 105 RJAH JP-08 1 36.181098938 Hyakuri Airport
PH [53291] JOL 4144 3047 Jolo [51037] 121.011001586914 airport [57449, 60951] 118 RPMJ PH-SLU 1 6.05366992950439 Jolo Airport
JP [40119, 40120] MSJ 10000 774 Misawa [16958, 17035] 141.367996216 airport [58678, 55176] 119 RJSM JP-02 1 40.7032012939 Misawa Air Base
PH [51046, 51047] VRC 5118 2439 Virac [39202, 16357] 124.206001281738 airport [60343, 56841] 121 RPUV PH-CAT 1 13.5763998031616 Virac Airport
JP [40124] OIM 5905 778 Izu Oshima [17039] 139.36000061 airport [58682, 55180] 130 RJTO JP-13 1 34.7820014954 Oshima Airport
JP [40020, 40021, 40022] MMB 8202 751 Ōzora [24438, 32444, 17012] 144.164001465 airport [58655, 55153] 135 RJCM JP-01 1 43.8805999756 Memanbetsu Airport
JP [10300, 10301, 10302, 10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10431, 10320, 10321, 10322, 10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342, 10343, 10432, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10433, 10434, 10356, 10357, 10358, 10359, 10360, 10361, 10362, 10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10435, 10436, 10437, 10438, 10440, 10372, 10373, 10374, 10375, 10376, 10377, 10384, 10385, 10378, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402, 10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10439, 10379, 10380, 10381, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422, 10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10382, 10383] NRT 13123 54 Tokyo [7455, 7540, 10715, 17060, 20298, 23468, 36258, 37858, 42674, 6022, 9150, 10803, 12394, 14026, 23645, 41159, 6146, 7657, 7746, 12508, 20495, 20543, 22060, 25319, 38111, 11043, 20581, 20631, 25376, 38168, 38218, 54232, 6308, 7880, 17497, 23916, 28730, 31925, 38287, 8002, 9600, 12769, 39969, 40008, 40034, 6471, 19282, 38505, 38518, 38524, 38534, 38541, 40047, 40054, 40062, 40075, 40097, 40138, 43300, 5466, 7106, 8237, 8715, 11352, 11896, 13474, 16236, 19852, 21031, 27888, 30547, 37532, 38549, 38555, 38566, 38581, 38622, 39066, 39140, 42253, 43349, 43376, 47049, 5141, 9896, 11993, 15205, 16290, 16767, 19485, 21127, 24279, 24332, 28030, 32303, 38671, 38708, 38720, 38727, 43521, 5692, 8400, 8859, 10447, 11561, 11643, 13690, 14809, 16376, 16939, 18491, 23281, 24404, 25999, 29704, 32361, 32409, 37188, 37234, 37655, 37670, 37742, 38769, 39269, 39295, 39308, 39341, 42519, 9038, 10553, 12204, 13274, 16530, 36174, 38933, 39411, 10182, 37369, 38969, 38991, 39046] 140.386001587 airport [54456, 57958] 141 RJAA JP-12 2 35.7647018433 Tokyo Narita
PH [51013, 51014] BXU 6450 2425 Butuan City [16345, 39024] 125.4788 airport [60329, 56827] 141 RPME PH-AGN 1 8.9515 Bancasi Airport
PH [51042] WNP 4599 2436 Naga [16354] 123.269996643066 airport [60340, 56838] 142 RPUN PH-CAS 1 13.5848999023438 Naga Airport
PH [51091, 51092, 51093] USU 3300 2451 Coron [39212, 16369, 39043] 120.099998474 airport [60355, 56853] 148 RPVV PH-PLW 1 12.1215000153 Francisco B. Reyes Airport
JP [40146, 40147, 40150, 40148, 40149] MMY 6560 781 Miyako City [54235, 40145, 24314, 38701, 17042] 125.294998169 airport [58685, 55183] 150 ROMY JP-47 1 24.7828006744 Miyako Airport
JP [40008, 40009, 40010, 40015, 40011, 40012, 40013, 40014] HKD 9842 749 Hakodate [23990, 10423, 24386, 24436, 32443, 16949, 17010, 42566] 140.822006226 airport [58653, 55151] 151 RJCH JP-01 1 41.7700004578 Hakodate Airport
JP [40105] IWJ 6562 770 Masuda [17031] 131.789993286 airport [58674, 55172] 184 RJOW JP-32 1 34.676399231 Iwami Airport
PH [51011, 51012] CBO 6234 2424 Cotabato City [16344, 39023] 124.209999084473 airport [60328, 56826] 189 RPMC PH-MAG 1 7.1652398109436 Awang Airport
PH [51048, 51049] CYZ 6890 2440 Cauayan City [39203, 16358] 121.752998352 airport [60344, 56842] 200 RPUY PH-ISA 1 16.9298992157 Cauayan Airport
JP [50964, 50965] TSJ 6234 2406 Tsushima [40073, 24318] 129.330993652 airport [60310, 56808] 213 RJDT JP-42 1 34.2849006653 Tsushima Airport
JP [40023, 40024] SHB 6560 752 Nakashibetsu [24439, 17013] 144.960006714 airport [58656, 55154] 234 RJCN JP-01 1 43.5774993896 Nakashibetsu Airport
JP [50966, 50967] FUJ 6561 2407 Goto [40074, 24319] 128.832992553711 airport [60311, 56809] 273 RJFE JP-42 1 32.6663017272949 Fukue Airport
PH [51043, 51044] BSO 4101 2437 Basco [39201, 16355] 121.980003357 airport [60341, 56839] 291 RPUO PH-CAG 1 20.4512996674 Basco Airport
JP [40121] ONJ 6562 775 Odate [17036] 140.371002197 airport [58679, 55177] 292 RJSR JP-05 1 40.1918983459 Odate Noshiro Airport
JP [50991, 50986, 50987, 50988, 50989, 50990] HNA 8202 2411 Morioka [50973, 24024, 24321, 12153, 16960, 24450] 141.134994506836 airport [60315, 56813] 297 RJSI JP-03 1 39.4286003112793 Hanamaki Airport
JP [39998] SHM 6560 746 Shirahama [17007] 135.363998413 airport [58650, 55148] 298 RJBD JP-30 2 33.6622009277 Nanki Shirahama Airport
JP [40123] HAC 6563 777 Hachijojima [17038] 139.785995483 airport [58681, 55179] 303 RJTH JP-13 1 33.1150016785 Hachijojima Airport
JP [40114, 40115, 40116, 40117, 40118] AXT 8200 773 Akita [24444, 16957, 17034, 18609, 32449] 140.218994140625 airport [58677, 55175] 313 RJSK JP-05 1 39.6156005859375 Akita Airport
JP [40016, 40017, 40018, 40019] KUH 8202 750 Kushiro [23991, 24387, 24437, 17011] 144.192993164 airport [58654, 55152] 327 RJCK JP-01 1 43.0410003662 Kushiro Airport
JP [40113, 40111, 40112] GAJ 6560 772 Yamagata [50972, 16956, 17033] 140.371002197 airport [58676, 55174] 353 RJSC JP-06 1 38.4118995667 Yamagata Airport
JP [50974, 50975, 50983, 50976, 50977, 50978, 50980, 50981, 50982, 50979] FSZ 8202 2409 Makinohara / Shimada [42767, 24023, 38517, 40096, 24320, 38706, 12152, 18633, 24448] 138.18775177 airport [60313, 56811] 433 RJNS JP-22 1 34.7960434679 Mt. Fuji Shizuoka Airport
PH [39198, 39199, 39200, 39201, 39202, 39203, 39204, 39205, 39206, 39207, 39208, 39209, 39210, 39182, 39183, 39184, 39185, 39211, 39212, 39186, 39187, 39188, 39213, 39189, 39190, 39197, 39191, 39192, 39193, 39194, 39195, 39196] CRK 10499 706 Angeles City [10657, 17180, 10942, 54114, 39762, 51021, 51039, 51041, 51044, 39858, 51047, 51049, 51052, 51055, 51060, 51065, 51068, 51071, 51079, 51088, 51093, 23983, 43319, 39102, 11456, 38657, 39226, 12084, 24382, 16478, 18590, 39014] 120.559997559 airport [55108, 58610] 484 RPLC PH-PAM 2 15.1859998703 Clark International Airport
JP [40007] OBO 8202 748 Obihiro [17009] 143.216995239 airport [58652, 55150] 505 RJCB JP-01 1 42.7332992554 Tokachi-Obihiro Airport
PH [51029, 51030, 51031] GES 10587 2431 General Santos [39229, 16350, 39030] 125.096000671 airport [60335, 56833] 505 RPMR PH-SCO 1 6.05800008774 General Santos International Airport
PH [51024, 51019, 51020, 51021, 51022, 51023] CGY 8050 2428 Cagayan De Oro City [39768, 51057, 39198, 39228, 16347, 39027] 124.611000061 airport [60332, 56830] 601 RPML PH-MSR 1 8.41561985016 Cagayan De Oro Airport
JP [38549, 38550, 38551, 38552, 38553, 38554] TAK 8200 685 Takamatsu [23969, 10401, 38691, 12068, 17004, 18573] 134.01600647 airport [55087, 58589] 607 RJOT JP-37 1 34.2141990662 Takamatsu Airport
JP [40061, 40054, 40055, 40056, 40057, 40058, 40060, 40059] KMJ 9840 760 Kumamoto [50969, 10426, 11465, 38697, 16951, 17021, 18604, 32447] 130.854995727539 airport [58664, 55162] 642 RJFT JP-43 1 32.8372993469238 Kumamoto Airport
JP [40110, 40106, 40107, 40108, 40109] AOJ 9846 771 Aomori [50971, 24443, 16955, 17032, 18608] 140.690994262695 airport [58675, 55173] 664 RJSA JP-02 1 40.7346992492676 Aomori Airport
JP [40085] NTQ 6562 764 Wajima [17025] 136.962005615 airport [58668, 55166] 718 RJNW JP-17 1 37.2930984497 Noto Airport
JP [40030, 40031, 40032, 40033] AKJ 8200 756 Asahikawa / Hokkaidō [23992, 32445, 17017, 18600] 142.447006225586 airport [58660, 55158] 721 RJEC JP-01 1 43.6707992553711 Asahikawa Airport
JP [40086, 40087, 40088, 40089, 40090, 40091, 40092, 40093] OKJ 9843 765 Okayama City [23483, 23996, 39106, 38699, 12094, 24442, 17026, 18607] 133.854995728 airport [58669, 55167] 806 RJOB JP-33 1 34.7569007874 Okayama Airport
JP [38517, 38505, 38506, 38507, 38508, 38509, 38510, 38511, 38512, 38516, 38514, 38513, 38515] KOJ 9840 680 Kagoshima [50980, 23967, 40001, 43312, 11438, 10396, 38687, 12065, 16943, 24370, 32431, 16999, 18568] 130.718994140625 airport [55082, 58584] 906 RJFK JP-46 1 31.8034000396729 Kagoshima Airport
JP [37655, 37656, 37657, 37658, 37659, 37660, 37661, 37662, 37663, 37664] HIJ 9842 666 Hiroshima [23954, 38576, 10388, 38686, 12053, 24423, 10629, 16998, 18558, 39356] 132.919006348 airport [55068, 58570] 1088 RJOA JP-34 1 34.4361000061 Hiroshima Airport
JP [50984, 50985] FKS 8202 2410 Sukagawa [16959, 24449] 140.430999755859 airport [60314, 56812] 1221 RJSF JP-07 1 37.2274017333984 Fukushima Airport
JP [50955, 50956] MMJ 6560 2403 Matsumoto [24316, 24446] 137.923004150391 airport [60307, 56805] 2182 RJAF JP-20 1 36.1668014526367 Matsumoto Airport

[BUG] HAVING does not work properly

Describe the bug

HAVING does not work properly

Steps to Reproduce

Attempt to run a query that uses HAVING.

Expected behavior

SELECT COUNT(column) FROM table GROUP BY column HAVING COUNT(column) > value should work.

Environment

Any

[BUG] SELECT query issues in DBVisualizer

The following SELECT queries were reported to have produced issues in DBVisualizer and need to be investigated further:

  • SELECT COUNT(code), COUNT(code) FROM country errors
  • SELECT COUNT(code), COUNT(*) FROM country errors
  • select country, count(country), count(1) from "gremlin"."airport" group by country
  • select country, count(city), sum(lon), avg(lon), min(lon), max(lon) from "gremlin"."airport" group by country
  • select country from "gremlin"."airport" order by 1
  • select distinct country from "gremlin"."airport" order by country desc
  • select country from "gremlin"."airport" order by country asc nulls first
  • select sum(lon) from "gremlin"."airport" where country = 'test'

[FEATURE] Enhance error message descriptions

The error logging in the JDBC driver and SQL-Gremlin has some gaps. Enhancing this would provide better debugging going forward - need to distinguish between supported an not supported errors.

[BUG] ORDER using a label fails

Describe the bug

ORDER using a label fails

Steps to Reproduce

Attempt to run a query that uses a label in an ORDER BY expression.

Expected behavior

SELECT column AS label FROM table ORDER BY label would sort by the label.

Environment

Any system

[BUG] JOIN query potential bug

The following was reported and needs investigation:

Tried to use Tableau to join continent and airport on contains_OUT/IN. Got weird message: Unexpected Errorjava.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: {"detailedMessage":"Invalid string=","requestId":"6c1da1df-bef7-421f-81bb-2de123a8ddfe","code":"InvalidParameterException"}java.io.PrintWriter@4fafe9a3Error Code: FAB9A2C5

[BUG] Edge tables are giving exceptions

Describe the bug

When using airport dataset, cannot view contents of "contains" table. Clicking data tab or running SELECT * FROM "contains". Get message about "Column continent_OUT_ID does not exist in table contains." for both. Similar for "route" table - "Column airport_OUT_ID does not exist in table route."

java.sql.SQLException: Error: Column airport_OUT_ID does not exist in 
table route.at 
org.twilmes.sql.gremlin.adapter.converter.SqlMetadata.getActualColu
mnName(SqlMetadata.java:199)at 
org.twilmes.sql.gremlin.adapter.converter.SqlTraversalEngine.append
GraphTraversal(SqlTraversalEngine.java:119)at 
org.twilmes.sql.gremlin.adapter.converter.SqlTraversalEngine.applySql
Identifier(SqlTraversalEngine.java:106)at 
org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSql
Select.applyColumnRetrieval(GremlinSqlSelect.java:118)at 
org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSql
Select.applyColumnRetrieval(GremlinSqlSelect.java:135)at 
org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSql
SelectSingle.generateTraversal(GremlinSqlSelectSingle.java:121)at 
org.twilmes.sql.gremlin.adapter.converter.ast.nodes.select.GremlinSql
Select.executeTraversal(GremlinSqlSelect.java:60)at 
org.twilmes.sql.gremlin.adapter.converter.SqlConverter.executeQuery(
SqlConverter.java:92)at 
software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.runQuery(
SqlGremlinQueryExecutor.java:176)at 
software.aws.neptune.jdbc.utilities.QueryExecutor.runCancellableQuery(QueryExecutor.java:156)at 
software.aws.neptune.gremlin.sql.SqlGremlinQueryExecutor.executeQuery(SqlGremlinQueryExecutor.java:169)at 
software.aws.neptune.jdbc.Statement.executeQuery(Statement.java:435)at 
software.aws.neptune.jdbc.Statement.execute(Statement.java:112)at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at 
java.base/java.lang.reflect.Method.invoke(Method.java:566)at 
com.onseven.dbvis.jdbc.b.c.b(Z:3273)at 
com.onseven.dbvis.jdbc.b.g$_b.call(Z:3572)at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)at 
java.base/java.lang.Thread.run(Thread.java:829)

[FEATURE] Use Maven Central Janino

A patched copy of janino is currently being used in the JDBC driver. The bug that was being patched in Janino has been fixed in a recent version so we can remove this hardcoded version.

"Failed to initialize pool: Feature is not supported" during Hikari initialization

As far as I understand, it is currently not possible to use the Neptune JDBC driver with HikariCP due to this error during new HikariDataSource(config):

com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Feature is not supported.
Caused by: java.sql.SQLFeatureNotSupportedException: Feature is not supported.
	at software.aws.neptune.jdbc.utilities.SqlError.createSQLFeatureNotSupportedException(SqlError.java:167)
	at software.aws.neptune.jdbc.Connection.setReadOnly(Connection.java:341)
	at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:409)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
	... 6 more

Could you add support for HikariCP?

[BUG] Database Metadata issues

The DatabaseMetadata has the following issues:

  • Connection URL is not reported
  • Server version is not reported
  • getTypeInfo returns an empty result set

[BUG] Tableau connector cannot run any query over nodes

Describe the bug

Tableau, using the provided TACO file and JDBC connector, cannot execute any queries over tables representing nodes in the graph. Queries over tables representing edges seem to work fine.

This happens in both "Live" and "Extract" modes in Tableau. According to the docs, Extract mode should be supported.

A Parse Error is thrown when attempting to run queries over node tables. When attempting to run Custom SQL that is simplified (i.e., SELECT city.name from gremlin.city) it results in a "Connection Error".

This image shows the error when a node table is dragged into the main tableau screen and "Update Now" is clicked to populate the interface with data from the table:
Screen Shot 2022-02-03 at 5 26 55 PM

This image shows the error from a simple custom SQL query:
Screen Shot 2022-02-03 at 5 29 58 PM

Steps to Reproduce

  • Is the JDBC Driver being used in a BI tool?

If being used in BI Tool, fill in:

  1. What vesion of the JDBC Driver are you using? 1.1.0
  2. What BI Tool are you using? Tableau
  3. What version of the BI tool are you using? 2021.4.3
  4. What Java version are you using? OpenJDK 17
  5. Please provide steps to reproduce bug from initial launch of BI tool
    1. Start ssh tunnel as per instructions
    2. Open Tableau
    3. Connect to server
    4. Watch Tableau populate tables with node and edge tables
    5. Attempt to run a query on any node table using either custom SQL or by asking it to populate the interface with data
  6. If bug occurred during query execution attach the SQL
    1. SELECT "city"."name" from "gremlin"."city"
  7. Attach debug logs if applicable/possible (please ensure it doesn't contain any sensitive information)
    1. Tableau logs seem very unhelpful, but happy to attach if requested.

Expected behavior

Expect Tableau to populate the interface with data from the node table and allow me to use it to do other things.

Environment

Please add the following information to your report:

  • OS: macOS Monterey
  • Version 12.1

Additional Context

Queries over edge tables work just fine. This led me to believe it was an issue with the cardinality of the properties in the node tables, since Neptune defaults to Cardinality.set for node properties. However after manually assigning all properties in the graph to be of Cardinality.single, this does not seem to be the case.

[BUG] LIMIT 1 DBVisualizer Exception

Describe the bug

SOmetimes LIMIT 1 throws exceptions in dbvisualizer. THis looks like a java thread interrupt is getting pushed into the thread dbvisualizer is monitoring the ResultSet with.

[BUG] Gremlin optional connection properties aren't passed to sql SchemaHelper

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:

  1. Typo in the GremlinQueryExecutor
  2. 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

  1. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.