我正在使用this driver进行服务帐户身份验证。
我已将其设置如下:
<dataSource
name="bq"
type="JdbcDataSource"
driver="net.starschema.clouddb.jdbc.BQDriver"
url="jdbc:BQDriver:projectid(paper%2D48)?withServiceAccount=true"
username="97838659-sfkvh341gqr77cu08aqcrq15mgec5@developer.gserviceaccount.com"
password="/Users/joe/projects/paper48/etl/Paper48-2504a86bc2ee.p12"
/>
当我尝试运行数据导入时,收到错误:
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.<init>(GoogleCredential.java:279)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential$Builder.build(GoogleCredential.java:414)
at net.starschema.clouddb.cmdlineverification.Oauth2Bigquery.authorizeviaservice(Oauth2Bigquery.java:206)
at net.starschema.clouddb.jdbc.BQConnection.<init>(BQConnection.java:213)
at net.starschema.clouddb.jdbc.BQDriver.connect(BQDriver.java:157)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:146)
at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:133)
at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:402)
at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:44)
at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:270)
我知道凭据有效,因为我已成功使用它来使用boto配置文件连接到GCS。可能是因为我需要通过&#39; notasecret&#39; p12文件的密码?