rwinch / spring-security-jira-to-gh

0 stars 0 forks source link

LDAP-311: Fix optional dependencies in spring-ldap-core #274

Closed rwinch closed 9 years ago

rwinch commented 10 years ago

Migrated from LDAP-311

For example spring-data-commons should be optional

This makes spring-data-commons from the dependencies of spring-ldap-core optional. This means any projects using Spring Data features of Spring LDAP will need to explicitly add it to pom. For example:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-commons</artifactId>
    <version>1.6.1.RELEASE</version>
</dependency>
rwinch commented 9 years ago

Michael Russo said:

From what I can see, LdapNamespaceHandler has a hard dependency on RepositoryBeanDefinitionParser, a class from spring-data-common. On init(), this class throws a java.lang.NoClassDefFoundError, which DefaultNamespaceHandlerResolver catches and rethrows as a FatalBeanException, with the message:

Invalid NamespaceHandler class [org.springframework.ldap.config.LdapNamespaceHandler] for namespace [http://www.springframework.org/schema/ldap]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/repository/config/RepositoryConfigurationExtension.

rwinch commented 9 years ago

Michael Russo said:

I created an issue for this bug: https://jira.spring.io/browse/LDAP-335