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

Spring JIRA | Cristi Vulpe | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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 | 3 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 | 3 years ago | Cristi Vulpe
    java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedPoolableObjectFactory
  3. 0

    java.lang.ClassNotFoundException: javax.persistence.EntityManagerFactory

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

    Automated exception search integrated into your IDE

  5. 0

    NoClassDefFoundError: org/apache/tiles/TilesApplicationContext Error with Spring Servlet

    Stack Overflow | 12 months ago | Ashish Panery
    java.lang.NoClassDefFoundError: org/apache/tiles/TilesApplicationContext
  6. 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

  1. andyglick 70 times, last 4 months ago
  2. tvrmsmith 1 times, last 4 months ago
  3. Andreas Häber 9 times, last 3 months ago
  4. batwalrus76 2 times, last 4 days ago
  5. tzrlk 1 times, last 4 weeks ago
10 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