天天看点

解决 Unable to translate SQLException with Error code ‘17059‘, will now try the fallback translator

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

1.报错: Unable to translate SQLException with Error code '17059', will now try the fallback translator

报错如下:

解决 Unable to translate SQLException with Error code ‘17059‘, will now try the fallback translator
解决 Unable to translate SQLException with Error code ‘17059‘, will now try the fallback translator

2. 原因和解决:  

在网上查到这个错是有结果返回,但是在装入resultMap的时候有问题。

我只是执行一个简单的查询sql。

我的情况是:有个字段在数据库中是字符串类型,但是我的代码中实体属性是定义为Integer类型,所以装不进去就报错。改了就OK了。

后来又有群友数据库用了clob字段,代码中不是用的String,也报这个错误。

so,遇到这个报错可以多考虑数据库字段类型和代码中类型不匹配原因。