NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory BasicDataSource Spring

后端 未结 1 1192
无人及你
无人及你 2021-01-18 02:51

I\'m new to Spring, still learning. I\'m using Spring Tool Suite version 3.5 with Java 6 on my Mac. I\'m attempting to use BasicDataSource



        
相关标签:
1条回答
  • 2021-01-18 03:11

    You're mixing up the versions. The KeyedObjectPoolFactory class exists in the 1.x branch of commons-pool, but not in 2.x. You should try with commons-pool-1.5.4 instead (which is the correct version dependency for commons-dbcp-1.4)

    And may I suggest using eg. Maven to manage your dependencies - you'll get the transitive dependencies versioned correctly for free (mostly at least...)

    Cheers,

    0 讨论(0)
提交回复
热议问题