You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
What is the bug?
Current JDBC driver triggers a URL syntax exception for URI SyntaxException when parsing JDBC URL's which are not formatted for Open Distro for Elasticsearch. This means the driver can throw the exception any time a (valid) non-elasticsearch URL is processed. In the below example, an Oracle URL was provided on a system which had both Open Distro for Elasticsearch and Oracle JDBC drivers on the classpath. The Open Distro for Elasticsearch driver was loaded first and triggered the exception. Per JDBC Specification 4.3 (Section 9.2 Page 53), connection methods should return NULL when a URL does not match the driver specification.
Exception:
com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionPropertyException: java.net.URISyntaxException: URL does not begin with the mandatory prefix jdbc:elasticsearch://.: jdbc:oracle://127.0.0.1:8080
JDBC Specification Excerpt:
When the DriverManager is trying to establish a connection, it calls that driver’s
connect method and passes the driver the URL. If the Driver implementation
understands the URL, it will return a Connection object or throw a SQLException
if a connection cannot be maded to the database. If the Driver implementation does
not understand the URL, it will return null
How can one reproduce the bug?
Steps to reproduce the behavior:
Note: Provided example are a manual way to reproduce as loading multiple drivers may not reproduce event.
Using a SQL Editor (Such as SQL Workbench) Create a new connection using the Open Distro for Elasticsearch driver, however provide a URL which is not in Open Distro for Elasticsearch Format.
Example:
SQL Server Driver Example:
What is the expected behavior?
Null should be returned by the driver when the connection URL does not match as described in JDBC Specification 4.3 (Section 9.2 Page 53)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What is the bug?
Current JDBC driver triggers a URL syntax exception for URI SyntaxException when parsing JDBC URL's which are not formatted for Open Distro for Elasticsearch. This means the driver can throw the exception any time a (valid) non-elasticsearch URL is processed. In the below example, an Oracle URL was provided on a system which had both Open Distro for Elasticsearch and Oracle JDBC drivers on the classpath. The Open Distro for Elasticsearch driver was loaded first and triggered the exception. Per JDBC Specification 4.3 (Section 9.2 Page 53), connection methods should return NULL when a URL does not match the driver specification.
Exception:
com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionPropertyException: java.net.URISyntaxException: URL does not begin with the mandatory prefix jdbc:elasticsearch://.: jdbc:oracle://127.0.0.1:8080
JDBC Specification Excerpt:
When the DriverManager is trying to establish a connection, it calls that driver’s
connect method and passes the driver the URL. If the Driver implementation
understands the URL, it will return a Connection object or throw a SQLException
if a connection cannot be maded to the database. If the Driver implementation does
not understand the URL, it will return null
How can one reproduce the bug?
Steps to reproduce the behavior:
Note: Provided example are a manual way to reproduce as loading multiple drivers may not reproduce event.
Using a SQL Editor (Such as SQL Workbench) Create a new connection using the Open Distro for Elasticsearch driver, however provide a URL which is not in Open Distro for Elasticsearch Format.
Example:
SQL Server Driver Example:
What is the expected behavior?
Null should be returned by the driver when the connection URL does not match as described in JDBC Specification 4.3 (Section 9.2 Page 53)
The text was updated successfully, but these errors were encountered: