最近在研究一个project,这个project是使用oracle做数据库开发的,在自己的本子上面跑一个oraclexe,资源耗费的太多了,导致影响工作效率。所以决定merge一下数据库,从oracle2mysql。

(1)使用mysql的mergetools,merge数据库表,

(2)修改hbm.xml的sequence,使用native。

(3)增加配置文件,配置数据库类型。

(4)修改代码,从配置文件中读出是那种数据库,替换其函数。

在merge过程中出现一个错误

resultset:;Column''notfound.

WARN:2007-11-2313:22:09,404:JDBCExceptionReporter[line:71}:SQLError:0,SQLState:S0022

ERROR:2007-11-2313:22:09,404:JDBCExceptionReporter[line:72}:Column''notfound.

Exceptioninthread"main"org.hibernate.exception.SQLGrammarException:couldnotexecutequery

atorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)

这个错误研究了几个小时,尝试了多种方式,最后才发现,其实只需要替换一下驱动jar就ok了。