Skip to content

Conversation

@cgpoh
Copy link
Contributor

@cgpoh cgpoh commented Jan 7, 2025

When the defaultRealm property is defined before the realmContextResolver property in the polaris-server.yml file, for example:

defaultRealm: polaris

realmContextResolver:
  type: default

the following exception is thrown:

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke "org.apache.polaris.service.context.RealmContextResolver.setDefaultRealm(String)" because "this.realmContextResolver" is null (through reference chain: org.apache.polaris.service.dropwizard.config.PolarisApplicationConfig["defaultRealm"])

This occurs because of the following line in the setDefaultRealm method:

realmContextResolver.setDefaultRealm(defaultRealm);

At the time defaultRealm is set, realmContextResolver has not yet been initialized, causing the exception.

@adutra
Copy link
Contributor

adutra commented Jan 7, 2025

This probably fixes #562.

@adutra adutra linked an issue Jan 7, 2025 that may be closed by this pull request
@adutra adutra merged commit c5bacbd into apache:main Jan 7, 2025
5 checks passed
@cgpoh
Copy link
Contributor Author

cgpoh commented Jan 7, 2025

Thanks @adutra

@cgpoh cgpoh deleted the update-default-realm-property branch January 7, 2025 12:15
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

Successfully merging this pull request may close these issues.

Configuration handling & implementation is racy

2 participants