hello

org.hibernate.HibernateException: Proxool Provider unable to load JAXP configurator file: proxool.xml

 

环境:    hibernate3.6 、proxool连接池
问题描述: 使用hibernate做orm时因为有一些东西是别人写的,在整合后就出现下面的问题(连接池重复注册
问题原因:
Configuration cfg = new AnnotationConfiguration().configure();   //此处重复加载了
		sessionFactory = cfg.buildSessionFactory(); 

 解决办法: 确定程序使用同一个Configuration

root cause

org.hibernate.HibernateException: Proxool Provider unable to load JAXP configurator file: proxool.xml
	org.hibernate.connection.ProxoolConnectionProvider.configure(ProxoolConnectionProvider.java:147)
	org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
	org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:84)
	org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:459)
	org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:91)
	org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2833)
	org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2829)
	org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1840)
	org.ims.Util.HibernateUtil.<clinit>(HibernateUtil.java:31)
	org.ims.Service.TradeComparator.Salecomparator(TradeComparator.java:113)
	org.ims.futures.action.trade.OrderAction.execute(OrderAction.java:32)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
	com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
	...............................

 

root cause

org.logicalcobwebs.proxool.ProxoolException: Parsing failed.
	org.logicalcobwebs.proxool.configuration.JAXPConfigurator.configure(JAXPConfigurator.java:91)
	org.logicalcobwebs.proxool.configuration.JAXPConfigurator.configure(JAXPConfigurator.java:107)
	org.hibernate.connection.ProxoolConnectionProvider.configure(ProxoolConnectionProvider.java:142)
	org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
	org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:84)
	org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:459)
	org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:91)
	org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2833)
	org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2829)
	org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1840)
	org.ims.Util.HibernateUtil.<clinit>(HibernateUtil.java:31)
	org.ims.Service.TradeComparator.Salecomparator(TradeComparator.java:113)
	org.ims.futures.action.trade.OrderAction.execute(OrderAction.java:32)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	..................

root cause

org.logicalcobwebs.proxool.ProxoolException: Attempt to register duplicate pool called 'daemon-proxool'
	org.logicalcobwebs.proxool.configuration.XMLConfigurator.endElement(XMLConfigurator.java:198)
	com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	.......................................................
posted @ 2012-11-15 23:45  酸塔  阅读(1142)  评论(0编辑  收藏  举报