commons-dbcp commons-pool 包缺失报错处理
2014-01-07 21:24
288 查看
简述:
记录一个应用服务器启动是,加载数据源报错的的bug
applicationContext-constants.xml
applicationContext-dao.xml
commons-dbcp
![](http://img.blog.csdn.net/20140107212016843)
commons-pool
![](http://img.blog.csdn.net/20140107211719390)
之后再Maven中加入了上述的两个依赖项
之后服务器正常启动
记录一个应用服务器启动是,加载数据源报错的的bug
applicationContext-constants.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:jdbc.properties</value> <value>classpath:system.properties</value> </list> </property> </bean> </beans>
applicationContext-dao.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- 指定Spring配置文件的Schema信息 --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> <!-- 定义数据源Bean--> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" depends-on="propertyConfigurer"> <property name="driverClassName" value="${driverClassName}" /> <!-- 根据部署的数据库做配置 --> <property name="url" value="${dbUrl}" /> <property name="username" value="${dbUserName}" /> <property name="password" value="${dbPassword}" /> </bean> <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource"> <ref local="dataSource" /> </property> </bean> <!-- <bean id="appDao" class="com.anialy.webproj.dao.AppDao"> <property name="jdbcTemplate"> <ref local="jdbcTemplate" /> </property> </bean> --> </beans>
commons-dbcp
commons-pool
之后再Maven中加入了上述的两个依赖项
<dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>20030825.184428</version> </dependency> <dependency> <groupId>commons-pool</groupId> <artifactId>commons-pool</artifactId> <version>20030825.183949</version> </dependency>
之后服务器正常启动
相关文章推荐
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFacmysql的安装版本和驱动版本不一致的问题
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The database is already in use by another p
- 【问题解决】 org.apache.commons.dbcp.SQLNestedException Cannot create PoolableConnectionFactory
- 值得纪念的错误:org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
- sql异常:nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection refus
- Hi!现在处理spring的一个问题java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01017: invalid username/password; logon denied 错误解决
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
- 使用Jakarta Commons Pool处理对象池化(二)(zt)
- 异常记录与处理-Cannot find class [org.apache.commons.dbcp.BasicDataSource]
- 使用Jakarta Commons Pool处理对象池化(一)(zt)
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
- 使用json-lib-2.1.jar报,org.apache.struts2.json.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public"-转载
- common-dbcp.jar和commons-pool.jar引用和bug
- struts链接apache数据库的commons-pool.jar和commons-dbcp.jar
- 使用Jakarta Commons Pool处理对象池化(zz)
- commons-pool冲突(jedis和dbcp)