Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] SDK throws null pointer exception when attempting to refresh tokens #335

Open
satviksr-db opened this issue Aug 27, 2024 · 0 comments

Comments

@satviksr-db
Copy link
Contributor

Description
Dear team,
Sometimes the SDK throws null pointer exception when attempting to refresh tokens, I am not entirely sure if there is an issue with the SDK or the API is behaving incorrectly

Caused by: java.lang.NullPointerException: accessToken must be defined
	at java.base/java.util.Objects.requireNonNull(Objects.java:246)
	at com.databricks.sdk.core.oauth.Token.<init>(Token.java:51)
	at com.databricks.sdk.core.oauth.Token.<init>(Token.java:41)
	at com.databricks.sdk.core.oauth.RefreshableTokenSource.retrieveToken(RefreshableTokenSource.java:74)
	at com.databricks.sdk.core.oauth.ClientCredentials.refresh(ClientCredentials.java:104)
	at com.databricks.sdk.core.oauth.RefreshableTokenSource.getToken(RefreshableTokenSource.java:84)
	at com.databricks.sdk.core.oauth.OAuthM2MServicePrincipalCredentialsProvider.lambda$configure$0(OAuthM2MServicePrincipalCredentialsProvider.java:45)
	at com.databricks.sdk.core.DatabricksConfig.authenticate(DatabricksConfig.java:189)

Reproduction
A minimal code sample demonstrating the bug.

Expected behavior
A clear and concise description of what you expected to happen.

Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?

Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to TRACE (e.g. add log4j.logger.com.databricks=TRACE to the log4j.properties in your project), and include the logs here.

Other Information

  • OS: [e.g. macOS]
  • Version: [e.g. 0.1.0]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant