问题描述
我们正在将oracle从11g升级到12c.我的应用程序使用的是3.6.8-Final版本的hibernate3.jar
.它在使用Oracle10gDialect
的11g上很好用,但是当我连接到12c数据库时,出现以下错误.我也将classes12.jar更改为ojdbc7.jar.
We are upgrading oracle from 11g to 12c. My application is using hibernate3.jar
which is 3.6.8-Final version. It works great with 11g using Oracle10gDialect
but when I connect to 12c database I get below error. I also changed classes12.jar to ojdbc7.jar.
我尝试降级到3.1.1
并升级到3.6.10-Final
.在3.6.8
下面,我的代码无法编译,因为在此之前没有Oracle10gDialect类.甚至3.6.10-final
版本也给了我同样的错误.我无法升级到Hibernate4.任何建议都会有很大帮助.谢谢.
I tried downgrading till 3.1.1
and upgrading till 3.6.10-Final
. Below 3.6.8
my code wont compile as there is no Oracle10gDialect class before that. And even 3.6.10-final
version gives me same above error. I cannot upgrade to Hibernate 4. Any advise will be of great help. thank you.
推荐答案
如果我没记错的话,您需要明确声明要使用的方言.我想我们做了一个JVM选项-Dhibernate.dialect=org.hibernate.dialect.Oracle10gDialect
,或者我们在domain.xml
中添加了一个配置(如果您使用的是Glassfish)hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
.希望这会有所帮助.
If I recall correctly, you need to explicitly declare what dialect to use. I think we did a JVM option -Dhibernate.dialect=org.hibernate.dialect.Oracle10gDialect
or we added a configuration in domain.xml
(if you're using Glassfish) hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
. Hope this helps.
这篇关于Hibernate3与Oracle 12c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!