Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource ?
super_junior 提问于:2017-09-06
0 0

ssh项目启动出错:

Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
    at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271)
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242)
    ... 37 more
  • 所有回答
bluesky 回答于:2017-09-07
0 0

缺少commons-dbcp.jar、commons-pool.jar

maven:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-dbcp2</artifactId>
    <version>2.1.1</version>
</dependency>

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-pool2</artifactId>
    <version>2.4.2</version>
</dependency>
我来回答    Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource ?