Spring SAML 2.0 - 导入 IDP 的本地元数据 - MetadataProviderException

Spring SAML 2.0 - Importing an IDP's local Metadata - MetadataProviderException

我已经在我的系统中实施了 SAML 2.0(我正在扮演 SP 角色)。
当我与带有远程元数据的 IDP 集成时,一切正常,这是由 URL.
提供给我的 我正在尝试与已向我发送其元数据的 IDP 集成,但由于某种原因它不起作用。

我试过:


    @豆
    @Qualifier("idp-ssocircle")
    publicExtendedMetadataDelegate ssoCircleExtendedMetadataProvider()
            抛出 MetadataProviderException {
        ClasspathResource 元数据 = null;
        尝试 {
            metadata = new ClasspathResource("/saml/metadata/sso.xml");
            logger.info("Metadata Exists!!");
        } 赶上(异常 e){
            logger.debug("Can't fetch metadata!!!");
        }

        计时器 timer = new Timer(true);
        ResourceBackedMetadataProvider provider = new ResourceBackedMetadataProvider(timer,metadata);
        return new ExtendedMetadataDelegate(provider, extendedMetadata());
    }

我也试过了:


    @豆
    @Qualifier("idp-ssocircle")
    publicExtendedMetadataDelegate ssoExtendedMetadataProvider()
            抛出 MetadataProviderException {
        文件元数据=空;
        尝试 {
            元数据=新文件("C:\my-path\saml\metadata\sso.xml");
            logger.info("Metadata Exists!!");
        } 赶上(异常 e){
            logger.debug("Can't fetch metadata!!!");
        }
        FilesystemMetadataProvider 提供者 = null;
        provider = new FilesystemMetadataProvider(元数据);
        return new ExtendedMetadataDelegate(provider, extendedMetadata());
    }

在这两种情况下,它都打印出元数据存在,我得到的错误是:


    2016-11-29 16:31:21,350 DEBUG [org.springframework.security.saml.metadata.ExtendedMetadataDelegate](ServerService 线程池 -- 70)初始化委托
    2016-11-29 16:31:21,351 错误
 [org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider](ServerService 线程池 -- 70)无法解组元数据:org.opensaml.xml.io.UnmarshallingException:java.lang.NullPointerException 
        在 org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.unmarshallMetadata(AbstractMetadataProvider.java:473)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.unmarshallMetadata(AbstractReloadingMetadataProvider.java:309)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.processNewMetadata(AbstractReloadingMetadataProvider.java:350)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.refresh(AbstractReloadingMetadataProvider.java:261)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.doInitialization(AbstractReloadingMetadataProvider.java:236)
        在 org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.initialize(AbstractMetadataProvider.java:407)
        在 org.springframework.security.saml.metadata.ExtendedMetadataDelegate.初始化(ExtendedMetadataDelegate.java:167)
        在 org.springframework.security.saml.metadata.MetadataManager.initializeProvider(MetadataManager.java:412)
        在 org.springframework.security.saml.metadata.MetadataManager.refreshMetadata(MetadataManager.java:238)
        在 org.springframework.security.saml.metadata.CachingMetadataManager.refreshMetadata(缓存MetadataManager.java:86)
        在 org.springframework.security.saml.metadata.MetadataManager.afterPropertiesSet(MetadataManager.java:142)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:921)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:864)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:575)
        在 org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:921)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:864)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:575)
        在 org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:304)
        在 com.wss.spring.WebSecurityConfig$$EnhancerBySpringCGLIB$$1a6d8a03.samlAuthenticationProvider()
        在 com.wss.spring.WebSecurityConfig.configure(WebSecurityConfig.java:528)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.authenticationManager(WebSecurityConfigurerAdapter.java:234)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:178)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:283)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:68)
        在 com.wss.spring.WebSecurityConfig$$EnhancerBySpringCGLIB$$1a6d8a03.init()
        在 org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:369)
        在 org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:322)
        在 org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:39)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:98)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$72eb2338.CGLIB$springSecurityFilterChain$3()
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$72eb2338$$FastClassBySpringCGLIB$$26d5f549.invoke()
        在 org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        在 org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:292)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$72eb2338.springSecurityFilterChain()
        在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
        在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        在 java.lang.reflect.Method.invoke(Method.java:498)
        在 org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
        在 org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:592)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1057)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean 实例 (AbstractAutowireCapableBeanFactory.java:953)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
        在 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
        在 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
        在 org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
        在 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
        在 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        在 io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        在 io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198)
        在 org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
        在 org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
        在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        在 java.util.concurrent.FutureTask.run(FutureTask.java:266)
        在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        在 java.lang.Thread.run(Thread.java:745)
        在 org.jboss.threads.JBossThread.run(JBossThread.java:320)
    原因:java.lang.NullPointerException
        在 org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.unmarshallMetadata(AbstractMetadataProvider.java:460)
        ... 93 更多

    2016-11-29 16:31:21,387 INFO [org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider](ServerService 线程池 -- 70)元数据提供程序 'vfs:/C:/my-path/saml/metadata/sso.xml' 的下一个刷新周期将在 2016 年发生-11-29T14:36:21.366Z'(本地时间'2016-11-29T16:36:21.366+02:00')
    2016-11-29 16:31:21,387 错误 [org.opensaml.saml2.metadata.provider.AbstractMetadataProvider](ServerService 线程池 -- 70)元数据提供程序未能正确初始化,fail-fast=true,暂停:org.opensaml.saml2.metadata.provider.MetadataProviderException: 
org.opensaml.saml2.metadata.provider.MetadataProviderException: 无法解组元数据

        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.refresh(AbstractReloadingMetadataProvider.java:267)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.doInitialization(AbstractReloadingMetadataProvider.java:236)
        在 org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.initialize(AbstractMetadataProvider.java:407)
        在 org.springframework.security.saml.metadata.ExtendedMetadataDelegate.初始化(ExtendedMetadataDelegate.java:167)
        在 org.springframework.security.saml.metadata.MetadataManager.initializeProvider(MetadataManager.java:412)
        在 org.springframework.security.saml.metadata.MetadataManager.refreshMetadata(MetadataManager.java:238)
        在 org.springframework.security.saml.metadata.CachingMetadataManager.refreshMetadata(缓存MetadataManager.java:86)
        在 org.springframework.security.saml.metadata.MetadataManager.afterPropertiesSet(MetadataManager.java:142)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:921)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:864)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:575)
        在 org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:921)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:864)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:575)
        在 org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:304)
        在 com.wss.spring.WebSecurityConfig$$EnhancerBySpringCGLIB$$1a6d8a03.samlAuthenticationProvider()
        在 com.wss.spring.WebSecurityConfig.configure(WebSecurityConfig.java:528)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.authenticationManager(WebSecurityConfigurerAdapter.java:234)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:178)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:283)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:68)
        在 com.wss.spring.WebSecurityConfig$$EnhancerBySpringCGLIB$$1a6d8a03.init()
        在 org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:369)
        在 org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:322)
        在 org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:39)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:98)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$72eb2338.CGLIB$springSecurityFilterChain$3()
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$72eb2338$$FastClassBySpringCGLIB$$26d5f549.invoke()
        在 org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        在 org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:292)
        在 org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$72eb2338.springSecurityFilterChain()
        在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
        在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        在 java.lang.reflect.Method.invoke(Method.java:498)
        在 org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
        在 org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:592)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1057)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean 实例 (AbstractAutowireCapableBeanFactory.java:953)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
        在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        在 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        在 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
        在 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        在 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
        在 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
        在 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
        在 org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
        在 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
        在 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        在 io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        在 io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198)
        在 org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
        在 org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
        在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        在 java.util.concurrent.FutureTask.run(FutureTask.java:266)
        在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        在 java.lang.Thread.run(Thread.java:745)
        在 org.jboss.threads.JBossThread.run(JBossThread.java:320)

    原因:org.opensaml.saml2.metadata.provider.MetadataProviderException:无法解组元数据

        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.unmarshallMetadata(AbstractReloadingMetadataProvider.java:313)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.processNewMetadata(AbstractReloadingMetadataProvider.java:350)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.refresh(AbstractReloadingMetadataProvider.java:261)
        ... 90 更多

    由以下原因引起:org.opensaml.xml.io.UnmarshallingException:java.lang.NullPointerException

        在 org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.unmarshallMetadata(AbstractMetadataProvider.java:473)
        在 org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.unmarshallMetadata(AbstractReloadingMetadataProvider.java:309)
        ... 92 更多
    原因:java.lang.NullPointerException
        在 org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.unmarshallMetadata(AbstractMetadataProvider.java:460)
        ... 93 更多

NullPointerException 来自 AbstractMetadataProvider 中的第 Document mdDocument = parser.parse(metadataInput); 行。

调用 provider.setParserPool(ParserPoolHolder.getPool()) 应该把它拿走。