DV Google Spreadsheet gives NullPointerException with OAuth2 AuthMethod
Issue
- Configured Google Spreadsheet Resource Adapter with OAuth2 AuthMethod, but see below in the server.log:
WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (teiid-async-threads - 1) IJ000604: Throwable while attempting to get a new connection: null: java.lang.NullPointerException
at org.teiid.resource.adapter.google.SpreadsheetConnectionImpl.<init>(SpreadsheetConnectionImpl.java:55)
at org.teiid.resource.adapter.google.SpreadsheetManagedConnectionFactory$1.getConnection(SpreadsheetManagedConnectionFactory.java:58)
at org.teiid.resource.adapter.google.SpreadsheetManagedConnectionFactory$1.getConnection(SpreadsheetManagedConnectionFactory.java:55)
at org.teiid.resource.spi.BasicManagedConnectionFactory.createManagedConnection(BasicManagedConnectionFactory.java:70) [teiid-api-8.7.6.6_2-redhat-1.jar:8.7.6.6_2-redhat-1]
Environment
- Red Hat JBoss Data Virtualization (DV)
- Google Spreadsheet Resource Adapter configured as:
<resource-adapter id="google">
<module slot="main" id="org.jboss.teiid.resource-adapter.google"/>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.google.SpreadsheetManagedConnectionFactory" jndi-name="java:/DSgoogle" enabled="true" use-java-context="true" pool-name="DSgoogle">
<config-property name="AuthMethod">OAuth2</config-property>
<config-property name="SpreadsheetName">DSGoogle</config-property>
<config-property name="BatchSize">200</config-property>
<config-property name="RefreshToken">refreshtoken</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.