Symptom
Backoffice failed to start up due to:
| Could not open ServletContext resource [/WEB-INF/security/samlKeystore.jks]","message":"Could not open ServletContext resource [/WEB-INF/security/samlKeystore.jks]","name":"java.io.FileNotFoundException" |
The full error/stack trace:
| "localizedMessage": "Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#3' while setting bean property 'sourceList' with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#3': Cannot resolve reference to bean 'samlMetadataFilter' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#3' while setting bean property 'sourceList' with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#3': Cannot resolve reference to bean 'samlMetadataFilter' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#3': Cannot resolve reference to bean 'samlMetadataFilter' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#3': Cannot resolve reference to bean 'samlMetadataFilter' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Error creating bean with name 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'relyingPartyRegistrationRepository' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.factory.BeanCreationException", "cause": { "localizedMessage": "Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "message": "Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Error initializing keystore", "name": "org.springframework.beans.BeanInstantiationException", "cause": { "localizedMessage": "Error initializing keystore", "message": "Error initializing keystore", "name": "de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException", "cause": { "localizedMessage": "Could not open ServletContext resource [/WEB-INF/security/samlKeystore.jks]", "message": "Could not open ServletContext resource [/WEB-INF/security/samlKeystore.jks]", "name": "java.io.FileNotFoundException", "extendedStackTrace": [ { "class": "org.springframework.web.context.support.ServletContextResource", "method": "getInputStream", "file": "ServletContextResource.java", "line": 154 }, { "class": "de.hybris.platform.samlsinglesignon.utils.JKSUtil", "method": "initializeKeyStore", "file": "JKSUtil.java", "line": 123 }, { "class": "de.hybris.platform.samlsinglesignon.utils.JKSUtil", "method": "getSigningAndDecryptionSaml2Credentials", "file": "JKSUtil.java", "line": 67 } ...... |
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Read more...
Environment
Product versions:
- SAP Commerce Cloud 2211.46 jdk17
- SAP Commerce Cloud 2211.1 jdk21
Product
SAP Commerce Cloud 2211
Keywords
samlKeystore.jks,FileNotFoundException , KBA , CEC-SCC-PLA-PL , Platform , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview