aws / amazon-neptune-jdbc-driver

Amazon Neptune JDBC Driver by Amazon Web Services
https://aws.amazon.com/neptune/
Apache License 2.0
23 stars 13 forks source link

Jena's ARQ context initialization issue #243

Closed jindrichmynarz closed 10 months ago

jindrichmynarz commented 1 year ago

When using this JDBC driver for querying an Amazon Neptune's SPARQL endpoint, the following error is shown:

java.sql.SQLException: Execute query has failed, error: java.lang.NullPointerException: Cannot invoke "shadow.org.apache.jena.sparql.util.Context.isTrue(shadow.org.apache.jena.sparql.util.Symbol)" because the return value of "shadow.org.apache.jena.query.ARQ.getContext()" is null.

I'm using the latest version of the driver (v3.0.2) with the all classifier.

Cole-Greer commented 1 year ago

Hi @jindrichmynarz, I'm looking into this issue, would you be able to provide a bit more context? A full stack trace would be helpful if available. Also could you provide the full connection string being used here (with redactions for the Neptune endpoint and other sensitive info)? Additionally what is the Neptune engine version in use? Is IAM auth enabled? How are you connecting to Neptune? Is the JDBC running from within the VPC or is it connecting through some other means such as an SSH tunnel? Thanks.

jindrichmynarz commented 12 months ago

The stack trace preceding the quoted error comes from our application. We use the Neptune engine version 1.2.1.0 with IAM authentication. We use JDBC URL of this format: jdbc:neptune:sparql://https://${HOST};port=${PORT};authScheme=IAMSigV4;serviceRegion=us-east-1;queryEndpoint=sparql;logLevel=trace. We connect to Neptune from the same VPC.