Announcement Announcement Module
Collapse
No announcement yet.
Avoiding Malformed Url, Spaces in cn= and o= Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Avoiding Malformed Url, Spaces in cn= and o=

    Hi,

    Using the sample application, I've used the following in my spring config

    <bean id="contextSource" class="org.springframework.ldap.support.LdapContex tSource" >
    <property name="urls" value="http://myserver:389" />
    <property name="userName" value="cn=Directory Manager" />
    <property name="password" value="secret" />
    <property name="base" value="o=foo and bar company" />
    <property name="dirObjectFactory" value="org.springframework.ldap.support.DefaultDir ObjectFactory" />
    </bean>

    When I run the test, I get this:

    Operation failed; nested exception is javax.naming.NamingException: Cannot parse url: http://myserver:389/o=the%20foo%20and%20bar%20company [Root exception is java.net.MalformedURLException: Not an LDAP URL: http://myserver:389/o=the%20foo%20and%20bar%20company]

    I know the spaces are the culprit, but how to I handle the spaces?

    Thanks,

    JR

  • #2
    Well, I'm 0-for-2 on the forum because I just found my error:

    http://www.adobe.com/cfusion/knowled...fm?id=tn_19576

    Error: javax.naming.NamingException: Cannot parse url: [protocol]://[server]:[port] [Root exception is java.net.MalformedURLException: Not an LDAP URL: [protocol]://[server]:[port]]

    Cause: The protocol you have specified is not correct.

    Note: Currently if you specify anything besides ldap for the protocol, you will receive this error.

    I noticed i used http in my snippet above.

    problem solved.

    Comment

    Working...
    X