Try add a

<setBody><constant></constant></setBody>

before sending to the ldap, so the message body is empty and not null.

On Mon, Mar 14, 2016 at 4:05 PM, rburdet <rodrigo.bur...@semperti.com> wrote:
> Im trying to connect to an online ldap server (defined here:
> http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
> )
> Server: ldap.forumsys.com
> Port: 389
> DN: ou=mathematicians,dc=example,dc=com
>
>
> This is my bean
> <bean id="ldapserver" class="javax.naming.directory.InitialDirContext"
> scope="prototype">
>         <argument>
>             <props>
>                 <prop key="java.naming.factory.initial"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                 <prop key="java.naming.provider.url"
> value="ldap://ldap.forumsys.com:389"/>
>                 <prop key="java.naming.security.authentication" value="none"
> />
>             </props>
>         </argument>
>    </bean>
>
> And this is my route
>
>   <route>
>     <from uri="timer://foo?period=5000"/>
>     <to uri="ldap:ldapserver?base=ou=mathematicians,dc=example,dc=com"/>
>     <log message="=== ${body}"/>
>    </route>
>
> The output error:
> WARN  Error processing exchange. Exchange[Message: [Body is null]]. Caused
> by: [javax.naming.directory.InvalidSearchFilterException - Empty filter]
> javax.naming.directory.InvalidSearchFilterException: Empty filter; remaining
> name 'ou=mathematicians,dc=example,dc=com'
>
> What am i doing wrong?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Connecting-to-LDAP-Server-tp5779023.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to