wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 729 forks source link

ClassNotFound exception in Federated SMS OTP #20415

Closed JayaShakthi97 closed 5 months ago

JayaShakthi97 commented 6 months ago

Describe the issue:

When trying federated SMS OTP flow in latest and IS 7.0, getting the following runtime exception. Note that this occurs only when the mobile number is not configured for the user.

[db2352f9-fec5-4c6c-92dd-4dd27a53617f] ERROR {org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[bridgeservlet]} - Servlet.service() for servlet [bridgeservlet] in context with path [/] threw exception [Servlet execution threw an exception] with root cause java.lang.ClassNotFoundException: org.wso2.carbon.identity.central.log.mgt.utils.LoggerUtils cannot be found by org.wso2.carbon.extension.identity.authenticator.smsotp.connector_3.3.20
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:512)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:423)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:415)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at org.wso2.carbon.identity.authenticator.smsotp.SMSOTPAuthenticator.getMobileNumberRequestPage(SMSOTPAuthenticator.java:441)
    at org.wso2.carbon.identity.authenticator.smsotp.SMSOTPAuthenticator.redirectToMobileNoReqPage(SMSOTPAuthenticator.java:1067)
    at org.wso2.carbon.identity.authenticator.smsotp.SMSOTPAuthenticator.getMobileNumber(SMSOTPAuthenticator.java:375)
    at org.wso2.carbon.identity.authenticator.smsotp.SMSOTPAuthenticator.initiateAuthenticationRequest(SMSOTPAuthenticator.java:317)
    at org.wso2.carbon.identity.authenticator.smsotp.SMSOTPAuthenticator.process(SMSOTPAuthenticator.java:192)
    at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.doAuthentication(DefaultStepHandler.java:725)

How to reproduce:

  1. Setup federated SMS OTP authenticator. Use the management console with the identity providers feature enabled.
  2. Add the configured federated SMS OTP as the second factor to an application.
  3. Create a user. Do not configure the mobile number for the user.
  4. Try login to the application and select configured SMS OTP as the second factor.
  5. Application will crash with above exception in server logs.

Expected behavior:

Mobile number configuring page should be rendered.

Environment information (Please complete the following information; remove any unnecessary fields) :

JayaShakthi97 commented 6 months ago

Fixed with: