'JDBC connection to Google Cloud Spanner parameters
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
Solution 1:[1]
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:
- You now have the JDBC URL in the field Custom JDBC Driver. The Custom JDBC driver field should be filled with the name or reference to the .jar file of the JDBC driver (exactly what this tool expects is impossible to know without knowing what tool it is).
- The string that you entered into the Custom JDBC driver field is what should be entered in Custom JDBC URL.
- User ID and Password should be left empty.
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.
EDIT: Client information and new Stacktrace shared
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:
- Which version of the driver are you using?
- Are you using a shaded jar with all dependencies? (see https://github.com/googleapis/java-spanner-jdbc#creating-a-shaded-jar)?
- If you are not using a shaded jar, how are you making sure that all the additional driver dependencies are also loaded by GeneXus?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |


