Announcement Announcement Module
No announcement yet.
Base path issue in JDK 1.4.2 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Base path issue in JDK 1.4.2


    I am trying to use ldaptemplate with JDK1.4.2 and it is giving me an error on startup while trying to initialize the bean saying "Base path is not supported for JDK versions < 1.4.2" in the file AbstractContextSource. I am trying to follow the example given in the quick start guide with the bean configuration as following:

    <bean id="contextSource"
    class=" ce">
    <property name="url" value="ldap://localhost:389" />
    <property name="userName" value="cn=Manager" />
    <property name="base" value="dc=jayway,dc=se" />
    <property name="password" value="secret" />

    Does this mean that I can not use the base property with JDK 1.4.2. If so what is the alternative, can it be done programatically?


  • #2
    It should be possible to use base path with jdk 1.4.2, but this is prevented due to a typo in AbstractContextSource. Sorry 'bout that; it will be fixed in the first release of Spring-LDAP due to be out soon.

    In the meantime, you could either use a later jdk temporarily or just skip the base path for now.


    • #3
      Thanks for the reply.

      I also thought this might be the issue, but was not sure.

      I am now connecting without using the base & it works, only that I have to give the full url everywhere I want to do a search.


      • #4
        Could you explain this problem detail?

        Hi all,

        I configed LDAP with Spring as:

        <bean id="contextSource" class=" tSource">
        <property name="url" value="ldap://cfserver" />
        <property name="base" value="dc=harveynash,dc=com" />
        <property name="userName" value="cn=Manager" />
        <property name="password" value="secret"/>

        <bean id="ldapTemplate" class="org.springframework.ldap.LdapTemplate">
        <constructor-arg ref="contextSource"/>

        I got error when I started application(with Tomcat1.4 server), as bellowing here:

        INFO: Destroying singletons in factory {org.springframework.beans.factory.suppor
        t.DefaultListableBeanFactory defining beans [contextSource,ldapTemplate,userProf
        ileLDAP,userProfileBO]; root of BeanFactory hierarchy}
        May 7, 2007 8:59:40 AM org.springframework.web.context.ContextLoader initWebAppl
        SEVERE: Context initialization failed
        org.springframework.beans.factory.BeanCreationExce ption: Error creating bean wit
        h name 'contextSource' defined in ServletContext resource [/WEB-INF/spring-confi
        g.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgu
        mentException: Base path is not supported for JDK versions < 1.4.2
        java.lang.IllegalArgumentException: Base path is not supported for JDK versions
        < 1.4.2

        I don't know why? what's this problem?

        Could you help me to solve ?


        Last edited by ttcom; May 6th, 2007, 09:38 PM.


        • #5
          You might have a version of the JDK that's 1.4.1 or earlier. Having a base path appended to the URL was not supported until JDK 1.4.2.

          What version of Spring LDAP are you using?


          • #6
            I've changed version of JDK(jdk1.5), and now it runs OK.
            (I used Sping-ldap1.1.2)