`
michael8335
  • 浏览: 187077 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Cannot find class [org.apache.commons.dbcp.BasicDataSource]

    博客分类:
  • S2SH
阅读更多
S2SH项目启动时,提示如下异常:
Cannot find class [org.apache.commons.dbcp.BasicDataSource]
Spring配置文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect">
<bean id="loginAction" class="com.test.action.usermanager.LoginAction" />
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:oracle"></property>
<property name="username" value="TestUser"></property>
<property name="password" value="TestUser"></property>
</bean>
</beans>
原因是缺少如下两个jar包:
commons-dbcp.jar、commons-pool.jar
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics