!MESSAGE An internal error occurred during: "Generating Artifacts".

!MESSAGE An internal error occurred during: "Generating Artifacts".

Caused by: java.sql.SQLException: org.logicalcobwebs.proxool.ProxoolException: Attempt to refer to a unregistered pool by its alias 'DBPool'

org.hibernate.HibernateException: Proxool Provider unable to load load Property configurator file: proxool.properties

myeclipse做hibernate反解析出错

今天在做ssh框架整合时出了这些问题.认真研究分析以后,发现myeclipse做反向生成的时候,会引用hibernate.cfg.xml配置文件来连接数据库做连接生成.但是我的配置文件是用的proxool.xml连接池来配置的.
很明显proxool.xml没有初始加载生成链接池,自然myeclipse怎么调用都会出现上面的错误了.
这个是我的配置文件:

<?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.show_sql">true</property>
<property name="hibernate.proxool.pool_alias">DBPool</property>
<property name="hibernate.proxool.properties">
proxool.properties
</property>
<property name="hibernate.connection.provider_class">
org.hibernate.connection.ProxoolConnectionProvider
</property>
<property name="hibernate.proxool.existing_pool">true</property>
<property name="hibernate.cache.use_query_cache">true</property>
</session-factory>
</hibernate-configuration>

 于是马上把配置文件改成:

<?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="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="myeclipse.connection.profile">mysql</property>
<property name="connection.url">
jdbc:mysql://127.0.0.1:3306/webgame?characterEncoding=utf-8
</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="show_sql">true</property>
<mapping
resource="com/webgame/account/form/WebgameAccountIndex.hbm.xml" />

</session-factory>
</hibernate-configuration>

 就成功了.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值