Hello @Rahul Kapoor , thank you for reaching out. I just see the ConfidentialClientApplication class being used here. To understand this better I would suggest debugging your code to check if there is any specific message being passed while your ExecutionException error gets caught in the catch block.
Also, here in the code try updating line 7 to CompletableFuture<IAuthenticationResult> future = app.acquireToken(clientCredentialParam);
Also, I would suggest taking a look at the following sample: https://github.com/Azure-Samples/ms-identity-java-daemon/tree/master/msal-client-credential-certificate/src/main/java
This also uses client_credentials flow with certificates.
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.