No Dialect mapping for JDBC type: -9

我们两清 提交于 2019-12-04 12:29:19
RVA

Finally the solution was indeed like org.hibernate.MappingException :No Dialect mapping for JDBC type: -9

I was looking at the wrong dialect.. This was for SQLServer and i'm using Oracle10gDialect. So i've made this class :

public class Oracle10gDialectOverrider extends Oracle10gDialect{

public Oracle10gDialectOverrider(){
    super();
    registerHibernateType(Types.NVARCHAR, Hibernate.STRING.getName());
}

}

And specify into my hibernate xml : Oracle10gDialectOverrider instead of Oracle10gDialect

Thanks

I received this error because I accidentally set classpath with ojdbc16.jar instead of ojdbc14.jar. A lot of answers out there to cast the data, which works, or to upgrade the dialect, which probably also works. Just wanted to list this in case anyone else had application dependent on the older jar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!