oracle 哪个休眠 jar 具有 OracleDialect 类?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4228401/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which hibernate jar has the OracleDialect class?
提问by wsb3383
I'm trying to install GridSphere through some app, there's an ant task that creates a database. So I changed the hibernate.properties file to use Oracle (instead of HSQL) but i'm getting this error:
我正在尝试通过某个应用程序安装 GridSphere,有一个创建数据库的 ant 任务。因此,我将 hibernate.properties 文件更改为使用 Oracle(而不是 HSQL),但出现此错误:
net.sf.hibernate.HibernateException: Could not instantiate dialect class
My dialect setting is:
我的方言设置是:
hibernate.dialect=org.hibernate.dialect.OracleDialect
I'm using Oracle10g
我正在使用 Oracle10g
回答by Binil Thomas
From the net.sf
package of the exception, I am guessing that you are using Hibernate 2. When it was in version 2, Hibernate was hosted on sourceforge and was released with the net.sf.hibernate
package. From version 3 they started using the org.hibernate
package. So the dialect you should be using is net.sf.hibernate.dialect.OracleDialect
or net.sf.hibernate.dialect.Oracle9Dialect
, instead of org.hibernate.dialect.OracleDialect
. You can still find older 2.x hibernate releases (with sources and documentation) on the sourceforge project page.
从net.sf
异常的包来看,我猜你用的是Hibernate 2。在版本2的时候,Hibernate托管在sourceforge上,随net.sf.hibernate
包一起发布。从版本 3 开始,他们开始使用该org.hibernate
软件包。所以你应该使用的方言是net.sf.hibernate.dialect.OracleDialect
or net.sf.hibernate.dialect.Oracle9Dialect
,而不是org.hibernate.dialect.OracleDialect
。您仍然可以在sourceforge 项目页面上找到较旧的 2.x hibernate 版本(带有源代码和文档)。
回答by darioo
This class should be in Hibernate core. Check out the source tree. What version of Hibernate are you using?
这个类应该在 Hibernate 核心中。查看源代码树。您使用的是哪个版本的 Hibernate?
Also, you might want to use org.hibernate.dialect.Oracle10gDialect
in your case.
此外,您可能想org.hibernate.dialect.Oracle10gDialect
在您的情况下使用。