<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi,</p>
    <p>I am faced with an ERROR in the Velocity filter template of an
      LDAP DataConnector. The connector looks like this:</p>
    <pre>    <DataConnector id="myLDAP2" ...>
        <Dependency ref="someAttributeXYZ" />
        <FilterTemplate>
            <![CDATA[
                (member=uid=$someAttributeXYZ.get(0),dc=some,dc=domain)
            ]]>
        </FilterTemplate>
</pre>
    <p>The error the templating engine spits out approximately says that
      there is no value for "someAttributeXYZ", so it cannot dereference
      its first element (ArrayIndexOutOfBoundsException). This is IdP
      v3.3.x. <br>
    </p>
    <p>Now I am baffled: I was under the assumption that if an
      attributeDefinition returns no value for an attribute, the
      dependent attributeDefinitions or dataConnectors would not fire in
      the first place. Obviously this does not seem to be the case. <br>
    </p>
    <p>I now do have a workaround that checks on
      $someAttributeXYZ.size() using a Velocity #if, but it is ugly
      because there needs to be some bogus filter string in the #else
      branch as well for the DataConnector to not fail.</p>
    <p>I feel there should be something like a <Dependency
      ref="someAttributeXYZ" <b>emptyisok</b><b>="false"</b> />. Am
      I missing something, or can this be reached via other means?</p>
    <p>Regards,</p>
    <p>Martin<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Dr. Martin Haase, Solutions Engineer

DAASI International GmbH        
Europaplatz 3                   
D-72072 Tübingen                
Germany                    

phone: +49 7071 407109-0
fax:   +49 7071 407109-9  
email: <a class="moz-txt-link-abbreviated" href="mailto:martin.haase@daasi.de">martin.haase@daasi.de</a>
web:   <a class="moz-txt-link-abbreviated" href="http://www.daasi.de">www.daasi.de</a>

Sitz der Gesellschaft: Tübingen
Registergericht: Amtsgericht Stuttgart, HRB 382175
Geschäftsleitung: Peter Gietz
</pre>
  </body>
</html>