2 Replies Latest reply on Sep 29, 2011 5:49 AM by cyd

    Anyone know how to setup spring-ldap in jboss7?

    yuanqixun

      I just want to use spring-ldap to access my ldap database, this is just an old project, I want to use the exist API to do the same work.

      I use the cidsource project's api to convert the spring bean to weld bean, and I can Inject the spring bean just as weld bean,

      But,if I deploy my project into jboss, I can't normal access ldap database, I can't paste the detail error now because of computer enviroment.

      And I deploy into tomcat 7, it work ok, anyone also do this work and have such error?

        • 1. Re: Anyone know how to setup spring-ldap in jboss7?
          yuanqixun

          The error stack is :

          -------------------------------------

          Servlet.service() for servlet test threw exception: org.springframework.ldap.core.ObjectRetrievalException: Binding did not contain any object.

              at org.springframework.ldap.core.ContextMapperCallbackHandler.getObjectFromNameClassPair(ContextMapperCallbackHandler.java:64) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.CollectingNameClassPairCallbackHandler.handleNameClassPair(CollectingNameClassPairCallbackHandler.java:50) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:297) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:259) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:606) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:524) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:473) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:493) [spring-ldap-1.3.0.RELEASE-all.jar:]

              at com.yongtai.org.dao.ldap.CompanyDaoLdap.findAll(CompanyDaoLdap.java:169) [org-ldap-1.0.0-SNAPSHOT.jar:]

              at com.yongtai.org.service.CompanyService.getGroups(CompanyService.java:142) [org-ldap-1.0.0-SNAPSHOT.jar:]

          • 2. Re: Anyone know how to setup spring-ldap in jboss7?
            cyd

            Hello, I have the same issue with springldap 1.3.0/1.3.1 and JBoss 7. I tried to add some dependencies in the application war manifest that was working fine on Jboss 5.1. The deployment is done successfully, however at runtime I get the ObjectRetrievalException: Binding did not contain any object as well. Something to do with classpath changes I guess. Couldn't get it working.