Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages when things fail #399

Closed
jimmyruska opened this issue Mar 19, 2021 · 0 comments · Fixed by googleapis/java-spanner#1011
Closed

Better error messages when things fail #399

jimmyruska opened this issue Mar 19, 2021 · 0 comments · Fixed by googleapis/java-spanner#1011
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API. documentation Improvements or additions to documentation type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jimmyruska
Copy link

jimmyruska commented Mar 19, 2021

This is to write down some feedback we've received based on a client using this jdbc driver

  • Problem: They tried using the JDBC driver but it failed with errors about SpannerException not being found: "Caused by: java.lang.ClassNotFoundException: com.google.cloud.spanner.SpannerException". This was because they were trying to use the jdbc driver with sqlline, a generic database tool that works with any JDBC, but the default JDBC download does not contain dependencies.

  • Resolution: Make the default JDBC driver download have all dependencies. If possible add error messages that say dependencies don't exist but are required

  • Problem: When trying to connect to spanner they were getting strange error messages. "Error: UNAVAILABLE: com.google.api.gax.rpc.UnavailableException: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception (state=,code=14)"

  • Resolution: The connection string still had emulator variables like localhost, and usePlainText=true, potentially "gcloud config set auth/disable_credentials true" could have been set. It would be helpful if there are better error messages like, "Connection could not be established to through grpc, check connection string".

  • Problem: They received an error "com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory$JdbcSqlExceptionImpl: INVALID_ARGUMENT: Invalid credentials path specified"

  • Resolution: Potentially the environment variable "GOOGLE_APPLICATION_CREDENTIALS" is pointing to the wrong path, or the default authentication file does not exist. If there could be an error message, like "$HOME/.config/gcloud/application_default_credentials.json" does not exist, please try clearing GOOGLE_APPLICATION_CREDENTIALS and running "gcloud auth application-default login" or activating a service key"

This post is just to relay the feedback, maybe I can help in implementing these eventually.

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner-jdbc API. label Mar 19, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 20, 2021
@olavloite olavloite added documentation Improvements or additions to documentation and removed triage me I really want to be triaged. labels Mar 23, 2021
@olavloite olavloite self-assigned this Mar 23, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 23, 2021
@olavloite olavloite added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API. documentation Improvements or additions to documentation type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants