Exception java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource

后端 未结 6 1878
广开言路
广开言路 2021-02-07 07:07

I\'m trying to integrate spring and Hibernate with mysql. I created a simple java project and a package with 3 classes, an application context.xml file, and an hbm.xml for mappi

6条回答
  •  清歌不尽
    2021-02-07 07:33

    Your problem is Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource on "dataSource" bean.

    If using maven add this dependency

    
        commons-dbcp
        commons-dbcp
        1.2.2
    
    

    else add this library commons-dbcp-jar in your classpath.

提交回复
热议问题