'LdapInvalidDnException: unexpected token:

I am getting the below exception while doing a ldap search and wondering if it is a problem with api or something I need to fix ?

16:41:19,290 ERROR [com.synchronoss.readytogo.handler.ZipFileHandler] (Thread-2038 (HornetQ-    client-global-threads-24851093))     org.apache.directory.api.ldap.model.exception.LdapInvalidDnException: unexpected token: :: org.apache.directory.api.ldap.model.exception.LdapInvalidDnException: unexpected token: :
at org.apache.directory.api.ldap.model.name.ComplexDnParser.parseDn(ComplexDnParser.java:58) [api-ldap-client-all-1.0.0-M16.jar:1.0.0-M16]
at org.apache.directory.api.ldap.model.name.Dn.parseInternal(Dn.java:1374) [api-ldap-client-all-1.0.0-M16.jar:1.0.0-M16]
at org.apache.directory.api.ldap.model.name.Dn.<init>(Dn.java:285) [api-ldap-client-all-1.0.0-M16.jar:1.0.0-M16]
at org.apache.directory.api.ldap.model.name.Dn.<init>(Dn.java:211) [api-ldap-client-all-1.0.0-M16.jar:1.0.0-M16]
at org.apache.directory.ldap.client.api.LdapNetworkConnection.search(LdapNetworkConnection.java:1506) [api-ldap-client-all-1.0.0-M16.jar:1.0.0-M16]

My DN value is "cn=device:abc:abc xyz x+:abc/cing/evitareul:4.2.2/jdq39/257669.4:user/release-keys,ou=Permissions,dc=r2g,dc=dcs,dc=zzz,dc=com" contains a plus sign, I believe that is causing the issue \, any help advice will be appreciated on the solution.



Solution 1:[1]

Two things: 1) The plus sign + indicates the that the DN is multi-valued.2) : is not allowed in an attribute name.

Simply put, one portion of the DN is:

cn=device:abc:abc xyz x

and the other portion is:

:abc/cing/evitareul:4.2.2/jdq39/257669.4:user/release-keys,ou=Permissions,dc=r2g,dc=dcs,dc=zzz,dc=com

The second portion of the multi-valued valued of the RDN (cn) is incorrect. Since the second portion is also an RDN (multi-valued DN), that portion should start with an attribute type/name:

cn=:abc/cing ...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bill K