rwinch / spring-security-jira-to-gh

0 stars 0 forks source link

LDAP-316: support for apache commons-pool2 #276

Closed rwinch closed 8 years ago

rwinch commented 10 years ago

Migrated from LDAP-316

I have tried to upgrade from commons-pool version 1.6 to commons-pool2 version 2.2 and I get this exception:

java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedPoolableObjectFactory
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
    at java.lang.Class.getDeclaredMethods(Class.java:1962)
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:570)
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:489)
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1059)
    at 
....

I have a bean that looks like this:

  <bean id="ldapContextSource"
    class="org.springframework.ldap.pool.factory.PoolingContextSource">
    ...
  </bean>

When I looked at the source code for PoolingContextSource.java I found that it is using the naming convention from commons-pool 1.x:

import org.apache.commons.pool.impl.GenericKeyedObjectPool;

. Is it possible to:

  1. Upgrade to the latest version (will very likely break backwards compatibility)?
  2. Provide an implementation that is sensitive to the classpath entries (i.e. detect which implementation to use)?
rwinch commented 9 years ago

Michael Osipov said:

I am highly interested in this. Pool 1.x and 2.x are not compatible and different package names.

rwinch commented 9 years ago

Anindya Chatterjee said:

Any update on this issue? Any road map for the implementation?

If not yet, I'll work on it and create PR.

rwinch commented 9 years ago

Rob Winch said:

anidotnet Thanks for the offer for making a PR! We would greatly appreciate it. Please ensure any PR that is submitted is passive so as not to break existing users.

rwinch commented 9 years ago

Anindya Chatterjee said:

I have submitted the PR as promised.

[https://github.com/spring-projects/spring-ldap/pull/33]

rwinch commented 9 years ago

Anindya Chatterjee said:

Any update please about merging the PR?

rwinch commented 8 years ago

Rob Winch said:

This is resolved in master