Getting NoClassDefFoundError exception for com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient
Hello everyone,
We are integrating Google reCaptcha enterprise version with AEM cloud. We are able to load reCaptcha challenge on custom form but while generating assessment score(through java code) we are getting NoClassDefFoundError exception.
We have imported below in core pom.xml:
RecaptchaEnterpriseServiceClient client = RecaptchaEnterpriseServiceClient.create()

Error:
com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient
Cannot serve request to /content/my-program/home/members.recaptcha-response in com.my.program.core.servlets.GetRecaptchaResponseServlet
Exception:
java.lang.NoClassDefFoundError: com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient at com.my.program.core.services.RecaptchaService.getResponse(RecaptchaService.java:61) at com.my.program.core.servlets.GetRecaptchaResponseServlet.doPost(GetRecaptchaResponseServlet.java:44)
Can anyone please help here?