PDA

View Full Version : subtree search in com.pentaho.security.ldap.search.LdapSearchParamsF actoryImpl



begunrom
10-16-2007, 04:47 AM
How can i specify in applicationContext-pentaho-security-ldap.xml that i want to search the Subtree of my AD structure.
In applicationContext-acegi-security-ldap.xml i can specify


<property name="searchSubtree" value="true"/>

in the bean, but this does not seem to work in applicationContext-pentaho-security-ldap.xml

I tried

<bean id="allUsernamesSearch"
class="com.pentaho.security.ldap.search.GenericLdapSearch">
<constructor-arg index="0" ref="initialDirContextFactory"/>
<constructor-arg index="1">
<bean
class="com.pentaho.security.ldap.search.LdapSearchParamsFactoryImpl">
<constructor-arg index="0" value="ou=Belgium"/>
<constructor-arg index="1" value="objectClass=person"/>
<property name="searchSubtree" value="true"/>
</bean>
</constructor-arg>
<constructor-arg index="2">
<bean
class="com.pentaho.security.ldap.transform.SearchResultToAttrValueList">
<constructor-arg index="0" value="cn"/>
</bean>
</constructor-arg>
</bean>


but got the following as error


org.springframework.beans.NotWritablePropertyException: Invalid property 'searchSubtree' of bean class [com.pentaho.security.ldap.search.LdapSearchParamsFactoryImpl]: Bean property 'searchSubtree' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

How can i specify to search the whole subtree?

mlowery
10-16-2007, 09:35 AM
Check out the very bottom of the Security Data Access Objects page (http://wiki.pentaho.org/display/PentahoDoc/01.+Security+Data+Access+Objects).