Uploaded image for project: 'OpenId Connect'
  1. OpenId Connect
  2. OIDC-88

Possible org.xwiki.contrib.oidc.auth.internal.store.OIDCUser cannot be cast to class org.xwiki.contrib.oidc.auth.internal.store.OIDCUser

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.21.2
    • 1.20.2
    • Authenticator
    • Unknown
    • N/A
    • N/A

    Description

      When adding new users and let them log in, the following error appears:

      ```
      HTTP Status 500 – Internal Server ErrorType Exception ReportMessage Failed to handle Resource Reference [path = authenticator/callback, endpoint = authenticator, pathSegments = [callback]]Description The server encountered an unexpected condition that prevented it from fulfilling the request.Exceptionjavax.servlet.ServletException: Failed to handle Resource Reference [path = authenticator/callback, endpoint = authenticator, pathSegments = [callback]] org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.handleResourceReference(ResourceReferenceHandlerServlet.java:161) org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.service(ResourceReferenceHandlerServlet.java:87) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:145)Root Causeorg.xwiki.resource.ResourceReferenceHandlerException: Failed to handle http servlet request org.xwiki.contrib.oidc.provider.internal.OIDCResourceReferenceHandler.handle(OIDCResourceReferenceHandler.java:110) org.xwiki.resource.internal.DefaultResourceReferenceHandlerChain.handleNext(DefaultResourceReferenceHandlerChain.java:79) org.xwiki.resource.internal.AbstractResourceReferenceHandlerManager.handle(AbstractResourceReferenceHandlerManager.java:82) org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.handleResourceReference(ResourceReferenceHandlerServlet.java:159) org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.service(ResourceReferenceHandlerServlet.java:87) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:145)Root Causejava.lang.ClassCastException: class org.xwiki.contrib.oidc.auth.internal.store.OIDCUser cannot be cast to class org.xwiki.contrib.oidc.auth.internal.store.OIDCUser (org.xwiki.contrib.oidc.auth.internal.store.OIDCUser is in unnamed module of loader org.xwiki.classloader.NamespaceURLClassLoader @208da898; org.xwiki.contrib.oidc.auth.internal.store.OIDCUser is in unnamed module of loader org.xwiki.classloader.NamespaceURLClassLoader @41043486) org.xwiki.contrib.oidc.auth.internal.store.OIDCUserStore.updateOIDCUser(OIDCUserStore.java:64) org.xwiki.contrib.oidc.auth.internal.OIDCUserManager.updateUser(OIDCUserManager.java:366) org.xwiki.contrib.oidc.auth.internal.OIDCUserManager.updateUserInfo(OIDCUserManager.java:197) org.xwiki.contrib.oidc.auth.internal.OIDCUserManager.updateUserInfo(OIDCUserManager.java:165) org.xwiki.contrib.oidc.auth.internal.endpoint.CallbackOIDCEndpoint.handle(CallbackOIDCEndpoint.java:194) org.xwiki.contrib.oidc.provider.internal.OIDCResourceReferenceHandler.handle(OIDCResourceReferenceHandler.java:134) org.xwiki.contrib.oidc.provider.internal.OIDCResourceReferenceHandler.handle(OIDCResourceReferenceHandler.java:108) org.xwiki.resource.internal.DefaultResourceReferenceHandlerChain.handleNext(DefaultResourceReferenceHandlerChain.java:79) org.xwiki.resource.internal.AbstractResourceReferenceHandlerManager.handle(AbstractResourceReferenceHandlerManager.java:82) org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.handleResourceReference(ResourceReferenceHandlerServlet.java:159) org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.service(ResourceReferenceHandlerServlet.java:87) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:145)Note The full stack trace of the root cause is available in the server logs.

      ```

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              andbot Andreas Maier
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: