java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedPoolableObjectFactory

Spring JIRA | Cristi Vulpe | 2 years ago
  1. 0

    I have tried to upgrade from commons-pool version 1.6 to commons-pool2 version 2.2 and I get this exception: {code} 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 .... {code} I have a bean that looks like this: {code:xml} <bean id="ldapContextSource" class="org.springframework.ldap.pool.factory.PoolingContextSource"> ... </bean> {code} When I looked at the source code for PoolingContextSource.java I found that it is using the naming convention from commons-pool 1.x: {code} import org.apache.commons.pool.impl.GenericKeyedObjectPool; {code}. 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)?

    Spring JIRA | 2 years ago | Cristi Vulpe
    java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedPoolableObjectFactory
  2. 0

    I have tried to upgrade from commons-pool version 1.6 to commons-pool2 version 2.2 and I get this exception: {code} 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 .... {code} I have a bean that looks like this: {code:xml} <bean id="ldapContextSource" class="org.springframework.ldap.pool.factory.PoolingContextSource"> ... </bean> {code} When I looked at the source code for PoolingContextSource.java I found that it is using the naming convention from commons-pool 1.x: {code} import org.apache.commons.pool.impl.GenericKeyedObjectPool; {code}. 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)?

    Spring JIRA | 2 years ago | Cristi Vulpe
    java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedPoolableObjectFactory
  3. 0

    java.lang.ClassNotFoundException: javax.persistence.EntityManagerFactory

    Stack Overflow | 7 months ago | agent154
    java.lang.NoClassDefFoundError: javax/persistence/EntityManagerFactory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Websockets autoconfig in 1.0.0.RC5 not compatible with tomcat 8.0.3

    GitHub | 3 years ago | masrawi
    java.lang.NoClassDefFoundError: org/apache/catalina/deploy/ApplicationListener
  6. 0

    Error using Spring Integration with Spring batch admin

    Stack Overflow | 2 years ago | rayman
    java.lang.NoClassDefFoundError: org/springframework/integration/MessagingException

  1. Andreas Häber 3 times, last 1 week ago
  2. linxiaolong 6 times, last 2 months ago
  3. poroszd 2 times, last 3 months ago
  4. aldrinleal 2 times, last 4 months ago
  5. davidvanlaatum 15 times, last 6 months ago
1 more registered users
84 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoClassDefFoundError

    org/apache/commons/pool/KeyedPoolableObjectFactory

    at java.lang.Class.getDeclaredMethods0()
  2. Java RT
    Class.getDeclaredMethods
    1. java.lang.Class.getDeclaredMethods0(Native Method)
    2. java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
    3. java.lang.Class.getDeclaredMethods(Class.java:1962)
    3 frames
  3. Spring Core
    ReflectionUtils.doWithMethods
    1. org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:570)
    2. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:489)
    3. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473)
    3 frames
  4. Spring Beans
    AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1059)
    2 frames