Err:Attempt to register duplicate pool called 'dbpool'

hibernate+proxool...

ERROR - Problem configuring /WEB-INF/classes/proxool.xmlorg.logicalcobwebs.proxool.ProxoolException: Parsing failed.

 org.logicalcobwebs.proxool.ProxoolException: Attempt to register duplicate pool called 'dbpool'
 ERROR - Problem configuring /WEB-INF/classes/proxool.xml
org.logicalcobwebs.proxool.ProxoolException: Parsing failed.

     org.logicalcobwebs.proxool.ProxoolException: Attempt to register duplicate pool called 'dbpool' 

*************************************************************************

原先在web.xml添加了proxool配置,如下:

-------------------------------------

 

<servlet>

<servlet-name>proxoolServletConfigurator</servlet-name>

<servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>

<init-param>

<param-name>xmlFile</param-name>

<param-value>/WEB-INF/classes/proxool.xml</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

 

-------------------------------------

本来在hibernate.cfg.xml里已经配置了proxool,如下:

========================

 

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE hibernate-configuration PUBLIC

          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>

<property name="show_sql">true</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="connection.driver_class">com.mysql.jdbc.Driver</property>

<property name="hibernate.proxool.pool_alias">dbpool</property>

<property name="hibernate.proxool.xml">proxool.xml</property>

<property name="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</property>

<mapping resource="com/zgsb/hibernate/vo/Admins.hbm.xml" />

<mapping resource="com/zgsb/hibernate/vo/Logs.hbm.xml" />

<mapping resource="com/zgsb/hibernate/vo/Article.hbm.xml" />

</session-factory>

</hibernate-configuration>

 

========================

启动tomcat时,报错:Attempt to register duplicate pool called 'dbpool' 

尝试重复注册连接池‘dbpool'

 *************************************************************************

 除了web.xml 配置的proxoolServletConfigurator的servlet.

重启tomcat,No problem.

转载于:https://www.cnblogs.com/tqspring/archive/2010/06/13/1758044.html

  • 0
    点赞
  • 0
    收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:编程工作室 设计师:CSDN官方博客 返回首页
评论
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值