Context initialization failed

Waqas Ahmed Khan waqas.ahmed0 at gmail.com
Mon Jul 16 01:26:31 EDT 2018


Hi,

I am getting *Context initialization failed *error after changing default
attribute-resolver.xml file with LDAP connector. The webpage also gives
Service Unavailable error. If i revert the file back to default settings,
the service starts working. I am using the same files in other IDP server
and it is working fine. But i dont know why its giving error on this IDP
server.

*IDP-Process Log:*

2018-07-16 09:49:08,364 - INFO
[net.shibboleth.utilities.java.support.service.AbstractReloadableService:216]
- Service 'shibboleth.LoggingService': Completing shutdown
2018-07-16 09:49:08,364 - ERROR
[org.springframework.web.context.ContextLoader:350] - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'shibboleth.metrics.RegisterMetricSets$child#0' defined in
file [C:\Program Files
(x86)\Shibboleth\IdP\system\conf\..\..\conf\admin\metrics.xml]: Cannot
resolve reference to bean 'shibboleth.metrics.AttributeResolverGaugeSet'
while setting bean property 'arguments' with key [7]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'shibboleth.metrics.AttributeResolverGaugeSet' defined in
file [C:\Program Files
(x86)\Shibboleth\IdP\system\conf\general-admin-system.xml]: Invocation of
init method failed; nested exception is
net.shibboleth.utilities.java.support.component.ComponentInitializationException:
Injected service was null or not an AttributeResolver
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'shibboleth.metrics.AttributeResolverGaugeSet'
defined in file [C:\Program Files
(x86)\Shibboleth\IdP\system\conf\general-admin-system.xml]: Invocation of
init method failed; nested exception is
net.shibboleth.utilities.java.support.component.ComponentInitializationException:
Injected service was null or not an AttributeResolver
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630)
Caused by:
net.shibboleth.utilities.java.support.component.ComponentInitializationException:
Injected service was null or not an AttributeResolver
    at
net.shibboleth.idp.attribute.resolver.impl.AttributeResolverServiceGaugeSet.doInitialize(AttributeResolverServiceGaugeSet.java:104)


*attribute-resolver.xml*

<?xml version="1.0" encoding="UTF-8"?>
<AttributeResolver
       xmlns="urn:mace:shibboleth:2.0:resolver"
       xmlns:sec="urn:mace:shibboleth:2.0:security"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:mace:shibboleth:2.0:resolver
http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd
                           urn:mace:shibboleth:2.0:security
http://shibboleth.net/schema/idp/shibboleth-security.xsd">

   <!-- ========================================== -->
   <!--      Attribute Definitions                 -->
   <!-- ========================================== -->

   <!-- Schema: Core schema attributes-->

   <AttributeDefinition xsi:type="Simple" id="uid"
sourceAttributeID="sAMAccountName">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:uid" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String"
name="urn:oid:0.9.2342.19200300.100.1.1" friendlyName="uid"
encodeType="false" />
   </AttributeDefinition>

   <AttributeDefinition xsi:type="Simple" id="mail"
sourceAttributeID="mail">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:mail" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String"
name="urn:oid:0.9.2342.19200300.100.1.3" friendlyName="mail"
encodeType="false" />
   </AttributeDefinition>

   <AttributeDefinition xsi:type="Simple" id="homePhone"
sourceAttributeID="homePhone">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:homePhone" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String"
name="urn:oid:0.9.2342.19200300.100.1.20" friendlyName="homePhone"
encodeType="false" />
   </AttributeDefinition>

   <AttributeDefinition xsi:type="Simple" id="homePostalAddress"
sourceAttributeID="homePostalAddress">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:homePostalAddress" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String"
name="urn:oid:0.9.2342.19200300.100.1.39" friendlyName="homePostalAddress"
encodeType="false" />
   </AttributeDefinition>

   <AttributeDefinition xsi:type="Simple" id="mobileNumber"
sourceAttributeID="mobile">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:mobile" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String"
name="urn:oid:0.9.2342.19200300.100.1.41" friendlyName="mobile"
encodeType="false" />
   </AttributeDefinition>

      <AttributeDefinition xsi:type="Simple" id="surname"
sourceAttributeID="sn">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:sn" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String" name="urn:oid:2.5.4.4"
friendlyName="sn" encodeType="false" />
   </AttributeDefinition>

         <AttributeDefinition xsi:type="Simple" id="organizationName"
sourceAttributeID="o">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:o" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String" name="urn:oid:2.5.4.10"
friendlyName="o" encodeType="false" />
   </AttributeDefinition>

    <AttributeDefinition xsi:type="Simple" id="title"
sourceAttributeID="title">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:title" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String" name="urn:oid:2.5.4.12"
friendlyName="title" encodeType="false" />
   </AttributeDefinition>


   <AttributeDefinition xsi:type="Simple" id="telephoneNumber"
sourceAttributeID="telephoneNumber">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:telephoneNumber" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String" name="urn:oid:2.5.4.20"
friendlyName="telephoneNumber" encodeType="false" />
   </AttributeDefinition>

   <AttributeDefinition xsi:type="Simple" id="givenName"
sourceAttributeID="givenName">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:givenName" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String" name="urn:oid:2.5.4.42"
friendlyName="givenName" encodeType="false" />
   </AttributeDefinition>

      <AttributeDefinition xsi:type="Simple" id="displayName"
sourceAttributeID="displayName">
       <Dependency ref="LDAP" />
       <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:displayName" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String"
name="urn:oid:2.16.840.1.113730.3.1.241" friendlyName="displayName"
encodeType="false" />
   </AttributeDefinition>

   <!-- ========================================== -->
   <!--      Data Connectors                       -->
   <!-- ========================================== -->

   <DataConnector id="LDAP" xsi:type="LDAPDirectory"
       ldapURL="%{idp.attribute.resolver.LDAP.ldapURL}"
       baseDN="%{idp.attribute.resolver.LDAP.baseDN}"
       principal="%{idp.attribute.resolver.LDAP.bindDN}"
       principalCredential="%{idp.attribute.resolver.LDAP.bindDNCredential}"
       useStartTLS="%{idp.attribute.resolver.LDAP.useStartTLS:true}"
       connectTimeout="%{idp.attribute.resolver.LDAP.connectTimeout}"
       responseTimeout="%{idp.attribute.resolver.LDAP.responseTimeout}">
       <FilterTemplate>
           <![CDATA[
               %{idp.attribute.resolver.LDAP.searchFilter}
           ]]>
       </FilterTemplate>


<ReturnAttributes>%{idp.attribute.resolver.LDAP.returnAttributes}</ReturnAttributes>

<ReturnAttributes>%{idp.authn.LDAP.returnAttributes}</ReturnAttributes>
   </DataConnector>

</AttributeResolver>


Thanks,

<waqas.ahmed0 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20180716/12686bd7/attachment.html>


More information about the users mailing list