Announcement Announcement Module
Collapse
No announcement yet.
Error initalizing LDAPContextSource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error initalizing LDAPContextSource

    Hi,

    I am a newbie to Spring LDAP. Trying to do a simple search.

    I am using maven to build , entries in my pom.xml
    <code>
    <!-- SPRING-FRAMEWORK LIBS -->
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>2.5</version>
    <type>jar</type>
    </dependency>

    <dependency>
    <groupId>org.springframework.ldap</groupId>
    <artifactId>spring-ldap-core</artifactId>
    <version>1.3.0.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.ldap</groupId>
    <artifactId>spring-ldap-core-tiger</artifactId>
    <version>1.3.0.RELEASE</version>
    </dependency>
    <!-- END - SPRING-FRAMEWORK LIBS -->

    </code>

    Spring context file
    <code>
    <!-- Spring LDAP configuration -->
    <bean id="contextSource"
    class="org.springframework.ldap.core.support.LdapC ontextSource">
    <property name="url" value="ldap://localhost:389" />
    <property name="base" value="dc=COXMedia" />
    <property name="userDn" value="cn=SuperAdmin,dc=COXMedia" />
    <property name="password" value="secret" />
    <property name="pooled" value="true"/>
    </bean>

    <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate" >
    <constructor-arg ref="contextSource" />
    </bean>
    <bean id="ldapReport"
    class="com.coxnet.idm.dao.ldap.ReportsDAOLdapImpl" >
    <property name="ldapTemplate" ref="ldapTemplate" />
    </bean>

    <!-- End LDAP Configuration -->
    </code>

    When deploying the application getting the following error

    <code>

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'contextSource' defined in class path resource [coxnetIDMApplicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateExcep tion; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationExceptio n:
    Property 'base' threw exception; nested exception is java.lang.NoSuchMethodError
    : isBlank
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.applyPropertyValues(AbstractAutowireCapabl eBeanFactory.java:1303)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.populateBean(AbstractAutowireCapableBeanFa ctory.java:1042)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFa ctory.java:539)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory$1.run(AbstractAutowireCapableBeanFactory.j ava:485)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFact ory.java:455)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getOb
    ject(AbstractBeanFactory.java:251)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:1 69)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean
    (AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean
    (AbstractBeanFactory.java:170)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactor y.java:413)
    at org.springframework.context.support.AbstractApplic ationContext.finish
    BeanFactoryInitialization(AbstractApplicationConte xt.java:735)
    at org.springframework.context.support.AbstractApplic ationContext.refres
    h(AbstractApplicationContext.java:369)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationCon
    text(ContextLoader.java:251)
    at org.springframework.web.context.ContextLoader.init WebApplicationConte
    xt(ContextLoader.java:190)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitiali
    zed(ContextLoaderListener.java:45)
    at weblogic.servlet.internal.EventsManager$FireContex tListenerAction.run
    (EventsManager.java:374)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:
    121)
    at weblogic.servlet.internal.EventsManager.notifyCont extCreatedEvent(Eve
    ntsManager.java:83)

    </code

    I will be really thankful for any help.

  • #2
    I was able to get pass the road block.
    It was due a jar conflict. I was having older version of commons-lang.jar in the classpath.

    Comment

    Working...
    X