其休眠罐子有OracleDialect类?
-
26-09-2019 - |
题
我想通过一些应用安装GridSphere,还有一个用于创建数据库的Ant任务。所以我改变了hibernate.properties文件使用Oracle(而不是HSQL),但我得到这个错误:
net.sf.hibernate.HibernateException: Could not instantiate dialect class
我的方言设置是:
hibernate.dialect=org.hibernate.dialect.OracleDialect
我使用的Oracle10g
解决方案
从异常的net.sf
包,我猜测你是使用Hibernate 2.当它在第2版,休眠托管在SourceForge上,并与net.sf.hibernate
包发布。从第3版,他们开始使用org.hibernate
包。所以,你应该使用的方言是net.sf.hibernate.dialect.OracleDialect
或net.sf.hibernate.dialect.Oracle9Dialect
,而不是org.hibernate.dialect.OracleDialect
。你仍然可以找到旧的2.X版本的休眠(带源代码和文档)在 SourceForge项目页面。
其他提示
此类应该在休眠芯。查看源树。您正在使用什么版本的Hibernate的?
此外,您可能想在你的情况下使用org.hibernate.dialect.Oracle10gDialect
。
不隶属于 StackOverflow