0 Replies Latest reply on Apr 4, 2016 4:09 PM by Rodrigo Burdet

    Spring-Ldap configuration

    Rodrigo Burdet Newbie

      Hi. Im having a problem with my spring-ldap configuration. And i havent found many examples about, so im a bit blind.

       

      A java.lang.NullPointerException is raised when this endpoint is reached:

          <to uri="spring-ldap:ldapTemplate?operation=search"/>

       

       

      I have this beans

         

          <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">

              <constructor-arg ref="ldapContextSource" />

          </bean>

         

          <bean id="ldapContextSource" class="org.springframework.ldap.core.support.LdapContextSource">

                      <property name="url" value="ldap://ldap.forumsys.com:389" />

                      <property name="base" value="dc=example,dc=com" />

          </bean>

         

       

      And this route:

       

        <camelContext xmlns="http://camel.apache.org/schema/spring">

          <route id="timerToLog">

          <from uri="timer:timerName?period=100000"/>

          <setBody>

            <constant>filter=(ou=mathematicians)</constant>

          </setBody>

          <to uri="spring-ldap:ldapTemplate?operation=search"/>

          <log message="==========${body}"/>

        </route>

        </camelContext>