-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: spannerIssues related to the googleapis/java-spanner-jdbc API.Issues related to the googleapis/java-spanner-jdbc API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- API: CloudSpanner JDBC
- OS type and version: Windows 10
- Java version: 8
- spanner-jdbc version(s): 1.12.0
Steps to reproduce
- have a google cloud platform project ID that has a period and a colon (we created this project before Google restricted project IDs to having only letters, numbers, and hyphens). I suppose this is a grandfathered project ID.
- try to use the project ID in creating the connection string. ours look like this:
jdbc:cloudspanner:/projects/safe.com:fme-big-query-api/instances/myinstance/databases/mydb
result:
error
com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory$JdbcSqlExceptionImpl: INVALID_ARGUMENT: invalid url: jdbc:cloudspanner:/projects/safe.com:fme-big-query-api/instances/myinstance/databases/mydb
Code example
String driverClassName = JdbcDriver.class.getCanonicalName();
Class<?> driverClass = Class.forName(driverClassName);
Driver driver = (Driver)driverClass.newInstance();
Connection connection = driver.connect(connString, connProps);
Stack trace
com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory$JdbcSqlExceptionImpl: INVALID_ARGUMENT: invalid url: jdbc:cloudspanner:/projects/safe.com:fme-big-query-api/instances/myinstance/databases/mydb
at com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory.of(JdbcSqlExceptionFactory.java:234)
at com.google.cloud.spanner.jdbc.JdbcDriver.connect(JdbcDriver.java:174)
Thanks!
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: spannerIssues related to the googleapis/java-spanner-jdbc API.Issues related to the googleapis/java-spanner-jdbc API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.