Reputation: 137
I have a Google Cloud Spanner instance and database.
But I don't know what to fill the "Custom JDBC URL" , "User id" or "User Password" with as this parameters are not given in the website or configured when creating the instance.
EDIT:
I have added some information leading to the following parameters:
My full path is now:
jdbc:cloudspanner:/projects/bupry-332316/instances/genupry-sql-test/databases/genupry-db-1?credentials=D:\Genexus\Models\Wultu\bupry-332316-f760bf33afc1.json;autocommit=false;lenient=true
However I am still getting an error, which is the following
Upvotes: 0
Views: 1500
Reputation: 3512
As @Catherine O mentioned in a comment: Please include what tool you are using to try to connect to Cloud Spanner.
Based on the screenshot you included, I think there are a couple of things that you need to change:
Cloud Spanner does not use a User ID and Password for authentication. Instead it uses Google Cloud credentials. Add these to the JDBC URL by adding something like ;credentials=/path/to/credentials.json
to the JDBC URL (the path must point to a valid credentials file). See also https://googleapis.dev/java/google-cloud-spanner-jdbc/latest/com/google/cloud/spanner/jdbc/JdbcDriver.html for a full example.
The stacktrace that you are now getting seems to indicate that the driver is being picked up and a connection is being made, but that there is some internal error in the JDBC driver:
Upvotes: 2