启动tomcat时,报错:Attempt to register duplicate pool called "eSale"

Hibernate配置连接池proxool出错:
启动tomcat时,报错:Attempt to register duplicate pool called "eSale"
错误原因:重复注册连接池:eSale(连接池别名)
如果在hibernate.cfg.xml已经配置proxool,如下:
<property name="hibernate.proxool.pool_alias">eSale</property>
<property name="hibernate.proxool.xml">
  proxool.xml
</property>
<property name="hibernate.connection.provider_class">
  org.hibernate.connection.ProxoolConnectionProvider
</property>
<property name="dialect">
  org.hibernate.dialect.SQLServerDialect
</property>
<property name = "hibernate.proxool.existing_pool">
  false
</property>
//这里为false,则在web.xml里面不用配置如下内容,反之可以
//------------------------------------------------
<servlet>
<servlet-name>ServletConfigurator</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>
//--------------------------------------------------

你可能感兴趣的:(tomcat,Hibernate,xml,Web)