[ 
https://issues.apache.org/jira/browse/DIRSERVER-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555554#action_12555554
 ] 

Simon Temple commented on DIRSERVER-1115:
-----------------------------------------

I think your proposed fix will fail.

The problem with your solution is that the constructor(s) LdapDN( String | Name 
) doesn't know you're passing in a normalized DN.

The attribute ldapDN.isNormailized is false

You could use the constructor with no arguments which sets normailized=true and 
then 

    dn.add( ServerDNConstants.ADMIN_SYSTEM_DN )

but Alex was not very happy with this and recommended the method in my patch.

I think you need to call normailze() on LdapDN.


> server-jndi: org.apache.directory.server.configuration.ApacheDS throws 
> java.lang.IllegalStateException: Names used for principals must be normalized!
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1115
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1115
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.2
>         Environment: Win 2003 Server, Sun JDK 1.5.1_11
>            Reporter: Simon Temple
>             Fix For: 1.5.2
>
>         Attachments: ds.patch
>
>
> Alex suggested:
> " I recommend you proceed like so for now:
> (1) get a handle on the DirectoryService
> (2) access the attributeType registry via 
> directoryService.getRegistries().getAttributeTypeRegistry() 
> (3) from the attribute type registry access the normalizer map 
> getNormalizerMap() or something like that
> (4) feed this into the dn.normalize() method of the dn you feed into 
> LdapPrincipal"
> This fixes the runtime problem.
> ** In addition, I'd like to request the method setLdifFilters() is made 
> public so an embedded application can continue to provide them (as was the 
> case with 1.0 and 1.5.1) **
> I'm not a committer but will attach a patch file.  Would you please consider 
> and apply the patch?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to