User receives nested exception for oauth2.client registration error accessing WebFOCUS


Diagnostics

Product: Installation and Configuration
Release: 8207
Primary OS: Linux
Solution Date:

Symptom

nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing Offending resource: class path resource [com/ibi/webapp/security/conf/was/saml/security-saml-main.xml] Bean 'wfMainSamlFilter'; nested exception is org.springframework.beans.FatalBeanException: Unresolvable class definition for NamespaceHandler class [org.springframework.security.config.SecurityNamespaceHandler] for namespace [http://www.springframework.org/schema/security]; nested exception is java.lang.NoClassDefFoundError: org.springframework.security.oauth2.client.registration.ClientRegistration$Builder

Problem

The user receives the above error message attempting to access WebFOCUS.

Solution

This issue is occurring because WebSphere required WebFOCUS to included oauth2 in the webapp.

Here are the steps to address this issue:

  1. Got to the following URL:  https://mvnrepository.com/artifact/org.springframework.security/spring-security-oauth2-client/5.3.5.RELEASE
  2. Download the jar file.
  3. Place the jar file into the shared library location (/opt/ibi/shared). It can also be added to the webfocus.war's file in the WEB-INF/lib folder.  

This is the Spring security 5.3.5 oauth2 client implementation. WebFOCUS does not use it in the WebFOCUS webapp, but the Spring security tries to check the security namespace and load some class files from this jar file.