Problem :When connecting to Google BigQuery using Tibco BigQuery JDBC Driver below error is thrown : | [toc] |
java.sql.SQLException: [TibcoSoftware][GoogleBigQuery JDBC Driver][GoogleBigQuery]general error at tibcosoftware.jdbc.base6_00_000569.BaseExceptions.b(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseExceptions.a(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseExceptions.a(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseExceptions.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.jdbc.q.b(Unknown Source) at tibcosoftware.phoenix6_00_1096.jdbc.q.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.jdbc.q.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.api.b.open(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseConnection.b(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseConnection.connect(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseConnection.d(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseConnection.a(Unknown Source) at tibcosoftware.jdbc.base6_00_000569.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDriverManagerConnectionFactory.createConnection(JdbcDriverManagerConnectionFactory.java:36) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.testConnection(JdbcDataSourceService.java:85) . . . Caused by: tibcosoftware.phoenix6_00_1096.sql.ae: general error at tibcosoftware.phoenix6_00_1096.sql.error.a.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.api.metadata.m.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.sql.j.u(Unknown Source) at tibcosoftware.phoenix6_00_1096.sql.j.open(Unknown Source) at tibcosoftware.phoenix6_00_1096.sql.k.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.sql.k.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.sql.bv.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.api.core.al$c.connect(Unknown Source) ... 194 more Caused by: java.lang.NullPointerException at tibcosoftware.jdbc.googlebigquery.adapter.GoogleBigQueryJsonWebToken.generatePrivateKeyFromJson(Unknown Source) at tibcosoftware.jdbc.googlebigquery.adapter.GoogleBigQueryServiceAccount.generateAccessToken(Unknown Source) at tibcosoftware.jdbc.googlebigquery.adapter.GoogleBigQueryServiceAccount.a(Unknown Source) at tibcosoftware.phoenix6_00_1096.api.y.br(Unknown Source) ... 201 more
Cause :
Currently, when connecting to Google BigQuery service using Tibco JDBC Google Big Query Driver we cannot use the .p12 private key file to connect to the BigQuery datasource in JasperReports server
Resolution :
Instead of using the .p12 private key file format we can download and use the JSON private key for our project in google cloud platform and add it to the jasperserver repository. Now while creating the Google Big Query JDBC data source under the private key path specify the location of the JSON security file. The connection test for Google Big Query with the .json private key is now successful.
Also, Jaspersoft uses progress JDBC drivers. For more info on how to establish the connection with your Google BigQuery Dataware House please refer to the below article: https://www.progress.com/tutorials/jdbc/connect-and-query-google-bigquery-using-jdbc-connector
NOTE:
1) The stack trace given in the problem section is not the complete stack trace and just a part of the original one. So it might happen that the problem you have will be different.
2a) The example jdbc url given in the article (https://www.progress.com/tutorials/jdbc/connect-and-query-google-bigquery-using-jdbc-connector) is like below: jdbc:datadirect:googlebigquery:AuthenticationMethod=serviceaccount;Project=<yourprojectname-12345>;Dataset=<your dataset name>;ServiceAccountEmail=<email@yourprojectname-12345.iam.gserviceaccount.com;ServiceAccountPrivateKey=/path-to/json-or-p12-file
2b) In case of using Tibco BigQuery Driver the jdbc url will look something like below: jdbc:tibcosoftware:googlebigquery:AuthenticationMethod=serviceaccount;Project=<yourprojectname-12345>;Dataset=<your dataset name>;ServiceAccountEmail=<email@yourprojectname-12345.iam.gserviceaccount.com;ServiceAccountPrivateKey=/path-to/json-file/in/jasperserver-repository
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now