Announcement Announcement Module
Collapse
No announcement yet.
Spring LDAP+ApacheDs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring LDAP+ApacheDs

    i want to ask about how to deploy or testing spring ldap on apacheds, & as reference i've already search & read on

    http://today.java.net/pub/a/today/20...ple.html#setup

    but i still don't understand how to test it, because i think in samplecode.zip there is something incomplete like in textContext.xml there is a line :
    <property name="dirObjectFactory" value="net.sf.ldaptemplate.support.DefaultDirObjectFactory">

    please if there is a full example about springldap i'm very need it

  • #2
    The article you are referring to is really old stuff. The reference documentation would be a good place to start. A more recent article describing Spring LDAP can be found here

    Comment


    • #3
      is there any sample?

      is there any full sample code that i can try?, and i have problem importing setup_data.ldif
      ERROR OPENING CONNECTION:
      [LDAP : error code 49-Bind failed:null]
      error details
      javax.naming.AuthenticationException:[LDAP:error code 49 - Bind failed:null]

      Comment


      • #4
        We no longer provide a buildable distribution, but you can check out the source like this:

        Code:
        svn co https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ldap/trunk spring-ldap
        The sample you should look at is called spring-ldap-person.

        Comment


        • #5
          Thank you Ulsa

          Thank you very much everybody especially Ulsa, you are helping me so much

          Comment


          • #6
            I'm sorry if i' asking you guys again

            Guys i've already downloading spring-ldap-person from svn like you said, but when i built it with ant on eclipse i received this kind of message:

            Buildfile: E:\Documents and Settings\Sherlha.MERUVIAN-10DJ1W\workspace\spring-ldap-person\build.xml

            BUILD FAILED
            E:\Documents and Settings\Sherlha.MERUVIAN-10DJ1W\workspace\spring-ldap-person\build.xml:14: Cannot find E:\Documents and Settings\Sherlha.MERUVIAN-10DJ1W\workspace\spring-ldap-person/../common-build/common-targets.xml imported from E:\Documents and Settings\Sherlha.MERUVIAN-10DJ1W\workspace\spring-ldap-person\build.xml

            Total time: 1 second

            and as additional information i'm using apache-tomcat-5.5, apachds-1.0.2, eclipse europa(yoxos) as my IDE & JDK1.6.0

            i'm sorry to bother you guys one more time, but i really one to use spring-ldap on my application, thank you

            Comment


            • #7
              You need to build spring-ldap first.

              % cd spring-ldap
              % ant dist

              You will most likely get this error, if you haven't installed JavaCC and pointed out to Ant where it is:

              Code:
              BUILD FAILED
              ... JavaCC home must be a valid directory.
              You install JavaCC say in /javacc-4.0 and put this in a spring-ldap/build.properties:

              Code:
              javacc.home.dir=/javacc-4.0
              Try building spring-ldap again:

              % ant dist

              If that succeeds, you'll get a snapshot build installed in your integration repo:

              % ls ../integration-repo/artifacts/org.springframework/spring-ldap/
              1.2.1-SNAPSHOT-20071206091603
              ivy-1.2.1-SNAPSHOT-20071206091603.xml
              ivy-1.2.1-SNAPSHOT-20071206091603.xml.md5
              ivy-1.2.1-SNAPSHOT-20071206091603.xml.sha1

              Next, you can build spring-ldap-person:

              % cd ../spring-ldap-person
              % ant

              If that succeeds, you'll get a war in target/artifacts:

              % ls target/artifacts/war
              ldap-person.war

              Deploy that in Tomcat and see how it goes.

              Comment


              • #8
                Guys thank you but.....

                Guys i'm not posting here since Ulsa(thank's again) good recomendation because, i still searching the solution for another error problem and istill not find it, first i think the problem maybe the unmatched library but then...... i don't know, now if you guys don't mind i want to asking what this error below means and how to solve it.

                [resolve.conf] ::::::::::::::::::::::::::::::::::::::::::::::
                [resolve.conf] :: UNRESOLVED DEPENDENCIES ::
                [resolve.conf] ::::::::::::::::::::::::::::::::::::::::::::::
                [resolve.conf] :: [ org.apache.directory.server | apacheds-protocol-ke
                beros | 1.0.0 ]: not found
                [resolve.conf] :: [ org.slf4j | slf4j-log4j12 | 1.0 ]: not found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-protocol-ld
                p | 1.0.0 ]: not found
                [resolve.conf] :: [ jdbm | jdbm | 1.0 ]: not found
                [resolve.conf] :: [ commons-lang | commons-lang | 2.1 ]: not found
                [resolve.conf] :: [ org.springframework | spring-jdbc | 2.0.6 ]: not f
                und
                [resolve.conf] :: [ org.springframework | spring-mock | 2.0.6 ]: not f
                und
                [resolve.conf] :: [ org.acegisecurity | acegi-security | 1.0.3 ]: not
                ound
                [resolve.conf] :: [ org.apache.directory.server | apacheds-core-shared
                | 1.0.0 ]: not found
                [resolve.conf] :: [ commons-collections | commons-collections | 3.1 ]:
                not found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-core | 1.0.
                ]: not found
                [resolve.conf] :: [ org.springframework | spring-support | 2.0.6 ]: no
                found
                [resolve.conf] :: [ log4j | log4j | 1.2.9 ]: not found
                [resolve.conf] :: [ commons-pool | commons-pool | 1.3 ]: not found
                [resolve.conf] :: [ jexcelapi | jxl | 2.5.9 ]: not found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-protocol-ch
                ngepw | 1.0.0 ]: not found
                [resolve.conf] :: [ aopalliance | aopalliance | 1.0 ]: not found
                [resolve.conf] :: [ junit-addons | junit-addons | 1.4 ]: not found
                [resolve.conf] :: [ org.springframework | spring-context | 2.0.6 ]: no
                found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-kerberos-sh
                red | 1.0.0 ]: not found
                [resolve.conf] :: [ easymock | easymock | 1.2_Java1.3 ]: not found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-protocol-sh
                red | 1.0.0 ]: not found
                [resolve.conf] :: [ com.cenqua.clover | clover | 1.3.12 ]: not found
                [resolve.conf] :: [ org.springframework | spring-remoting | 2.0.6 ]: n
                t found
                [resolve.conf] :: [ cglib | cglib-nodep | 2.1_3 ]: not found
                [resolve.conf] :: [ org.ddsteps | DDSteps | 1.1 ]: not found
                [resolve.conf] :: [ hsqldb | hsqldb | 1.8.0.7 ]: not found
                [resolve.conf] :: [ org.springframework | spring-aop | 2.0.6 ]: not fo
                nd
                [resolve.conf] :: [ junit | junit | 3.8.1 ]: not found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-server-main
                | 1.0.0 ]: not found
                [resolve.conf] :: [ ehcache | ehcache | 1.1 ]: not found
                [resolve.conf] :: [ org.apache.mina | mina-filter-ssl | 1.0.0 ]: not f
                und
                [resolve.conf] :: [ org.apache.mina | mina-core | 1.0.0 ]: not found
                [resolve.conf] :: [ org.springframework | spring-core | 2.0.6 ]: not f
                und
                [resolve.conf] :: [ org.springframework | spring-dao | 2.0.6 ]: not fo
                nd
                [resolve.conf] :: [ org.apache.directory.shared | shared-ldap | 0.9.5.
                ]: not found
                [resolve.conf] :: [ junitperf | junitperf | 1.8 ]: not found
                [resolve.conf] :: [ antlr | antlr | 2.7.2 ]: not found
                [resolve.conf] :: [ org.apache.directory.server | apacheds-server-jndi
                | 1.0.0 ]: not found
                [resolve.conf] :: [ org.apache.directory.shared | shared-asn1 | 0.9.5.
                ]: not found
                [resolve.conf] :: [ commons-logging | commons-logging | 1.0.4 ]: not f
                und
                [resolve.conf] :: [ gsbase | gsbase | 2.0.1 ]: not found
                [resolve.conf] :: [ org.apache.directory.shared | shared-asn1-codec |
                .9.5.3 ]: not found
                [resolve.conf] :: [ com.sun | ldapbp | 1.0 ]: not found
                [resolve.conf] :: [ org.springframework | spring-beans | 2.0.6 ]: not
                ound
                [resolve.conf] :: [ net.sf.ehcache | ehcache-constructs | 0.6 ]: not f
                und
                [resolve.conf] ::::::::::::::::::::::::::::::::::::::::::::::
                [resolve.conf]
                [resolve.conf]
                [resolve.conf] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

                BUILD FAILED
                G:\Developing\spring-ldap\trunk\build-spring-ldap\build.xml:157: The following
                rror occurred while executing this line:
                G:\Developing\spring-ldap\trunk\common-build\common-targets.xml:351: impossible
                to resolve dependencies: resolve failed - see output for details

                Total time: 3 seconds
                Last edited by Arkumik; Dec 11th, 2007, 03:53 AM. Reason: there is a missing sentence

                Comment


                • #9
                  It looks like you don't have network access. The build script initially resolves all dependencies by downloading them from repositories on the Internet to a local cache on your hard disk (usually ~/.ivy/cache).

                  Comment


                  • #10
                    thank you once again :-) guys

                    yup thank you for your sugestion, yes indeed i.m not compile it on network access connected to internet and because of your enlightment i can go to next step but, i don't understand what is this error mean :

                    BUILD FAILED
                    E:\Documents and Settings\Sherlha.MERUVIAN-10DJ1W\workspace\springframework\spring-ldap\trunk\spring-ldap\build.xml:88: JavaCC home must be a valid directory.

                    Total time: 4 minutes 48 seconds

                    oh yeah btw my javacc settings are like this:

                    JAVACC_HOME= F:\javacc-4.0
                    path=%JAVACC_HOME%\bin;

                    Comment


                    • #11
                      Thank you guys

                      Thank you for all of you, because now i have succeed to build ldap-person and just for the information i have failed in previous step because i think there is a missing file and that file is build.properties, and finally in my desperation i make a file build.properties that contain javacc.home.dir=f:\javacc-4.0, and then i'm very happy it works properly like i wanted, and now i will test the ldap-person.war. Thank you so much and i hope you guys still want to bother by me on the next problem

                      Comment


                      • #12
                        Guys...

                        is this already using ldap feature?, i asking these because when i build ldap-person.war in tomcat and it run perfectly, even i'm not turn on the apacheds yet, so my question is how do i know this application has already using ldap feature?

                        Comment


                        • #13
                          The demo app automatically kicks off an ApacheDS server in-memory, so yes, it's actually working against an LDAP serer behind the scenes.

                          Comment


                          • #14
                            If you look at src/main/webapp/WEB-INF/apacheDsContext.xml, you'll see how the ApacheDS is automatically started and loaded with test data. This ability to start an LDAP server in your JVM is valuable in integration testing and, like here, in a sample application. In real life, however, you would most likely have a directory server running somewhere in the enterprise.

                            Comment


                            • #15
                              What about connecting between Acegi &amp; Spring LDAP

                              is it deficult to connecting between Acegi & spring ldap? & how good acegi is, or i there any better stuff beside acegi?, is there any sample tutorial for this?

                              Comment

                              Working...
                              X