日期:2014-05-18  浏览次数:20769 次

Hibernate+proxool链接数据失败是什么原因?
配置好了之后访问是TOMCAT报如下错误:
Proxool   Provider   unable   to   load   JAXP   configurat   or   file:   proxool.xml
以下是所用到的代码,请大家帮我看看问题出在那里了?谢谢!


[hibernate.cfg.xml]代码如下:

<?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= "hibernate.proxool.pool_alias "> dbpool </property>
<property   name= "hibernate.proxool.xml "> proxool.xml </property>
<property   name= "connection.provider_class "> org.hibernate.connection.ProxoolConnectionProvider </property>
<property   name= "hibernate.show_sql "> false </property>
<property   name= "hibernate.dialect "> org.hibernate.dialect.MySQLInnoDBDialect </property>
<property   name= "hibernate.connection.driver_class "> com.mysql.jdbc.Driver </property>  
<!--   Mapping   files   -->
<mapping   resource= "com/tcs/bean/entitybean/Employee.hbm.xml "   />
</session-factory>
</hibernate-configuration>


[proxool.xml]代码如下:

<?Xml   version= "1.0 "   encoding= "utf-8 "?>
<!--   the   proxool   configuration   can   be   embedded   within   your   own   application 's.
        Anything   outside   the   "proxool "   tag   is   ignored.   -->
<something-else-entirely>
        <proxool>
                <alias> dbpool </alias>
                <!--proxool只能管理由自己产生的连接-->
                <driver-url>
                    jdbc:mysql://127.0.0.1:3306/tcs?useUnicode=true&amp;characterEncoding=UTF-8
                </driver-url>
                <driver-class> com.mysql.jdbc.Driver </driver-class>
                <driver-properties>
                        <property   name= "user "   value= "root "   />
                        <property   name= "password "   value= "123123 "   />
                </driver-properties>
                <!--   proxool自动侦察各个连接状态的时间间隔(毫秒),侦察到空闲的连接就马上回收,超时的销毁-->
                <house-keeping-sleep-time> 90000 </house-keeping-sleep-time>
  &