04-26-2022 12:23 PM - edited 02-04-2024 3:17 AM
Getting the below issue while upgrading from Hybris 1808 to 2011 version.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#2': Cannot resolve reference to bean 'metadataGeneratorFilter' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metadataGeneratorFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot create inner bean 'org.springframework.security.saml.metadata.MetadataGenerator#76048930' of type [org.springframework.security.saml.metadata.MetadataGenerator] while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.saml.metadata.MetadataGenerator#76048930': Unsatisfied dependency expressed through method 'setSamlEntryPoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'samlEntryPoint': Unsatisfied dependency expressed through method 'setMetadata' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metadata' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot create inner bean 'org.springframework.security.saml.metadata.ExtendedMetadataDelegate#719a2d6c' of type [org.springframework.security.saml.metadata.ExtendedMetadataDelegate] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.saml.metadata.ExtendedMetadataDelegate#719a2d6c' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot create inner bean 'org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider#3d6a4f43' of type [org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider#3d6a4f43' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Error converting typed String value for constructor argument; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.io.File'; nested exception is java.lang.IllegalArgumentException: Could not retrieve file for class path resource [security/metadata-non_prod.xml]: class path resource [security/metadata-non_prod.xml] cannot be resolved to URL because it does not exist
Hi Pritika,
With an upgrade the attribute definition for the metadata file is changed from the string path to the reference of the file object. This is explained from the logs you posted as:
Failed to convert value of type 'java.lang.String' to required type 'java.io.File
I would advise you to find the property or place where you are referring to the path security/metadata-non_prod.xml
Then you can look for it's bean configuration in the respective spring-security-config.xml file this should have a value something like:
<value>${sso.metadata.location:./WEB-INF/security/metadata.xml}</value>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.