收藏本站腾讯微博新浪微博

经典论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

蓝色理想 最新研发动态 网站开通淘帖功能 - 蓝色理想插件 论坛内容导读一页看论坛 - 给官方提建议

论坛活动及任务 地图和邮件任务 请多用悬赏提问 热夏来袭,选一款蓝色理想的个性T恤吧!

手机上论坛,使用APP获得更好体验 急需前端攻城狮,获得内部推荐机会 论坛开通淘帖功能,收藏终于可以分类了!

搜索
查看: 3549|回复: 0

[java] myeclipse配置hibernate+proxool的时候出现错误:

[复制链接]
发表于 2009-9-29 16:34:41 | 显示全部楼层 |阅读模式
myeclipse配置hibernate+proxool的时候出现错误:
!MESSAGE An internal error occurred during: "Generating Artifacts".

Caused by: java.sql.SQLException: No suitable driver found for proxool.test,
但实际直接使用proxool连接数据库却正常,请问是什么原因啊,使用的jdbc:com.mysql.jdbc.Driver(mysql-connector-java-5.1.7-bin.jar)


错误信息:
!ENTRY org.eclipse.core.jobs 4 2 2009-09-29 16:18:22.713
!MESSAGE An internal error occurred during: "Generating Artifacts".
!STACK 0
org.hibernate.exception.JDBCConnectionException: Getting database metadata
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
        at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:64)
        at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(AbstractMetaDataDialect.java:163)
        at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:22)
        at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476)
        at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
        at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:104)
        at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:92)
        at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:137)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$7.execute(GenerateArtifactsJob.java:882)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:863)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:410)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.sql.SQLException: No suitable driver found for proxool.test
        at java.sql.DriverManager.getConnection(DriverManager.java:602)
        at java.sql.DriverManager.getConnection(DriverManager.java:207)
        at org.hibernate.connection.ProxoolConnectionProvider.getConnection(ProxoolConnectionProvider.java:53)
        at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getConnection(AbstractMetaDataDialect.java:122)
        at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:61)
        ... 13 more


proxool xml:

<?xml version="1.0" encoding="utf-8"?>
<something-else-entirely>
  <proxool>
    <alias>test</alias>
    <driver-url>jdbc:mysql://localhost:3306/iwebkit</driver-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <driver-properties>
      <property name="user" value="root"/>
      <property name="password" value="111111g"/>
    </driver-properties>
    <maximum-connection-count>20</maximum-connection-count>
    <house-keeping-test-sql>select CURRENT_DATE</house-keeping-test-sql>
  </proxool>
</something-else-entirely>


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">

<!-- Generated by MyEclipse Hibernate Tools.                   -->
<hibernate-configuration>

<session-factory>
        <!-- <property name="connection.username">root</property> -->
        <!-- <property name="connection.url">jdbc:mysql://localhost:3306/iwebkit</property>-->
        <property name="hbm2ddl.auto">update</property>
        <!--<property name="connection.password">111111g</property>-->
        <property name="hibernate.connection.provider_class">
                org.hibernate.connection.ProxoolConnectionProvider
        </property>
        <property name="hibernate.proxool.existing_pool">true</property>
        <property name="hibernate.proxool.pool_alias">test</property>
        <property name="hibernate.proxool.xml">proxool.xml</property>
        <property name="show_sql">true</property>
        <property name="myeclipse.connection.profile">
                com.mysql.jdbc.Driver
        </property>
        <property name="connection.url">
                jdbc:mysql://localhost:3306/iwebkit
        </property>
        <property name="connection.username">root</property>
        <property name="connection.password">111111g</property>
        <property name="connection.driver_class">
                com.mysql.jdbc.Driver
        </property>
        <property name="dialect">
                org.hibernate.dialect.MySQLDialect
        </property>



</session-factory>

</hibernate-configuration>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|Archiver|手机版|blueidea.com ( ICP05002321 )  

GMT+8, 2019-5-19 20:42 , Processed in 0.078125 second(s), 9 queries , Gzip On, Memcache On.

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表