As a result of PR #100 I get an exception "Client Secret cannot be null" in my code where I use the CDP driver with ibatis framework.
Note: I use user/password authentication
My driver version was built from 5ff75823d8f690f11b23b74365cd2f9bcac376c7 commit
INFO [T000@main] [12:49:34.289] | Getting query config from CDP Query Service
WARN [T000@main] [12:49:34.317] | Failure #1. Retrying.
WARN [T000@main] [12:49:34.318] | Failure #2. Retrying.
WARN [T000@main] [12:49:34.319] | Failure #3. Retrying.
WARN [T000@main] [12:49:34.319] | Failed to connect. Max retries exceeded.
ERROR [T000@main] [12:49:34.320] | Exception while connecting to server
java.sql.SQLException: Client Secret cannot be null
at com.salesforce.cdp.queryservice.util.QueryTokenExecutor.getTokenWithTenantUrl(QueryTokenExecutor.java:111)
at com.salesforce.cdp.queryservice.util.QueryExecutor.getQueryConfig(QueryExecutor.java:107)
at com.salesforce.cdp.queryservice.core.QueryServiceConnection.getQueryConfigResponse(QueryServiceConnection.java:451)
at com.salesforce.cdp.queryservice.core.QueryServiceConnection.isValid(QueryServiceConnection.java:342)
at com.salesforce.cdp.queryservice.core.QueryServiceConnection.<init>(QueryServiceConnection.java:71)
at com.salesforce.cdp.queryservice.QueryServiceDriver.connect(QueryServiceDriver.java:65)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:224)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:219)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:95)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:446)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:96)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:145)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:67)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:357)
at jdk.proxy2/jdk.proxy2.$Proxy46.selectList(Unknown Source)
at org.apache.ibatis.session.SqlSessionManager.selectList(SqlSessionManager.java:206)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
at jdk.proxy2/jdk.proxy2.$Proxy85.getRowsForSession(Unknown Source)
at qa.ok.projects.sfra.db.steps.DbSteps.getRow(DbSteps.java:88)
at qa.ok.projects.sfra.db.steps.DbSteps$$EnhancerByGuice$$200626032.GUICE$TRAMPOLINE(<generated>)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)
at qa.ok.fw.support.reporting.StepInterceptor.invoke(StepInterceptor.java:123)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)
at qa.ok.projects.sfra.db.steps.DbSteps$$EnhancerByGuice$$200626032.getRow(<generated>)
at qa.ok.projects.sfra.tests.DbTests.userCanAddNewAddress(DbTests.java:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:209)
at qa.ok.projects.shared.BaseTest.run(BaseTest.java:97)
at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:221)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:657)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Caused by: com.salesforce.cdp.queryservice.util.TokenException: Client Secret cannot be null
at com.salesforce.cdp.queryservice.util.TokenHelper.retrieveTokenWithPasswordGrant(TokenHelper.java:108)
at com.salesforce.cdp.queryservice.util.TokenHelper.getToken(TokenHelper.java:80)
at com.salesforce.cdp.queryservice.util.QueryTokenExecutor.lambda$getTokenWithTenantUrl$2(QueryTokenExecutor.java:105)
at net.jodah.failsafe.Functions.lambda$get$0(Functions.java:46)
at net.jodah.failsafe.RetryPolicyExecutor.lambda$supply$0(RetryPolicyExecutor.java:65)
at net.jodah.failsafe.Execution.executeSync(Execution.java:128)
at net.jodah.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:378)
at net.jodah.failsafe.FailsafeExecutor.get(FailsafeExecutor.java:68)
at com.salesforce.cdp.queryservice.util.QueryTokenExecutor.getTokenWithTenantUrl(QueryTokenExecutor.java:104)
... 71 more
As a result of PR #100 I get an exception "Client Secret cannot be null" in my code where I use the CDP driver with ibatis framework. Note: I use user/password authentication
My driver version was built from 5ff75823d8f690f11b23b74365cd2f9bcac376c7 commit