In my case, the issue was because the app was set to use spring-boot-ext-security-starter-credhub-credential and there were some issues with that setup.
So I removed credhub from the manifest file and pom and fetched credentials in a different way; then the error was gone.