Skip to content

Fix NPE for incomplete JDBC URLs - #1646

Open
cat23123 wants to merge 3 commits into
databricks:mainfrom
cat23123:fix/1630-invalid-uri-npe
Open

Fix NPE for incomplete JDBC URLs#1646
cat23123 wants to merge 3 commits into
databricks:mainfrom
cat23123:fix/1630-invalid-uri-npe

Conversation

@cat23123

@cat23123 cat23123 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes #1630.

  • Validates unconditionally required connection parameters.
  • Returns a DatabricksValidationException with INPUT_VALIDATION_ERROR when a required parameter is missing or blank, preventing the NullPointerException.
  • Handles null JDBC URLs safely during URL validation.

Testing

  • Added parser coverage for null URLs and missing, empty, and blank required parameters.
  • Added a public Driver.connect() regression test for the issue reproduction.
  • Verified the existing valid base-URL flow where httpPath is supplied through Properties.

Additional Notes to the Reviewer

httpPath is currently the only parameter required unconditionally to construct a connection context. Authentication requirements remain validated according to their existing mode-specific rules.

Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
@cat23123
cat23123 marked this pull request as ready for review August 19, 2026 21:43

@vuanhphung vuanhphung left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but will defer to @gopalldb for one final review in case I miss anything.

@cat23123 cat23123 added the engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs) label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] NPE when trying to connect to the database using invalid URI

2 participants