spring-projects / spring-projects/spring-ldap

How to configure 2.3.1

Open
#442 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
375
Forks
501
Avg merge
6h 4m
Merged PRs (30d)
63

Description

I am attempting to upgrade from 2.0.4 to 2.3.1 and I am having some difficulties.

I have added the latest spring-data-commons (Ingalls) and spring-data-ldap (1.0.0). It all seems to compile fine after updating the package names to use the spring data packages.

The problem I get is at runtime:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [repositories]
Offending resource: class path resource [embedded_springldap.xml]

embedded_springldap.xml has:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:ldap="http://www.springframework.org/schema/ldap"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd 
       http://www.springframework.org/schema/context 
       http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/ldap 
       http://www.springframework.org/schema/ldap/spring-ldap.xsd">

        ....
        <ldap:repositories base-package="com.example.package" />
        ...

I'm trying to follow the docs but it is rather light on the details.

The LdapNamespaceHandler used to register the parser but now it doesn't and I can't seem to find out what should.

It is probably a classpath problem but I can't work out what is missing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with embedded_springldap.xml and the LdapNamespaceHandler, then compare the 2.3.1 configuration with the linked Spring LDAP repository documentation. Determine which dependency or namespace registration is required for the ldap:repositories element, and verify that the XML loads without BeanDefinitionParsingException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.