-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mybatis 3.51版本的LocalDateTime映射报SQLFeatureNotSupportedException #3230
Comments
居然有人一起遇到了一个问题 |
同样的问题,怎么处理的 |
我把LocalDateTime换成了Date,或者对mybatis的jar包进行降级 |
我直接换了个连接池 |
我也遇到了这样的问题 |
谁能提供最好的方案不
在 2019-05-21 10:14:49,"zhanzhanrufeng" <notifications@github.com> 写道:
我也遇到了这样的问题
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
我用的mybatisplus 也出现LocalDateTime无法映射,有没有大神出来解决一下这个问题 |
这个应该是mysql驱动的问题,升级新的mysql驱动试试看? |
我切换普通数据源就没这个问题 |
我用druid链接的时候有问题,不过换成HikariCP就没问题了!菜鸡一枚,原因找不到的。不过能这样解决。个人推测是druid的问题,抛错也是指向druid这边的。驱动是mysql-8.0.15;springboot版本是2.1.4 |
。。蓝瘦。换HikariCP了。 |
这个问题很多issues了,也好几年了,就是一直无说明,无修复,issues也一直不处理,不知道什么意思 |
哈哈哈 迫于mybatis的官方压力 |
我这边用起来还是 |
更新到1.1.18还是报错 Caused by: java.sql.SQLFeatureNotSupportedException: null |
启用 filter 就会出现 1.1.18 之前版本是调用 1.1.18 版本修改后,不启用 filter 直接走 看了下,大概需要修改 Druid 中 不知道我的理解对不对。看到要修改这么多东西,我暂时放弃了。 |
切换到1.1.18后找不到DruidDataSource.java,这个类,,是我的包有问题么,1.1.17没问题 |
把mybatis的版本降级就可以了,org.mybatis:mybatis:3.5.0 |
只能降了才能用 |
mybatis-spring-boot-starter 换成 2.0.0 就可以了 => 就是org.mybatis换成 3.5.0的 |
确实只有降级才可以用 |
这个问题还是没有彻底弄好 |
感觉1.1.18到1.1.202个版本,都没有着重修复总要的bug,反而修修一些小东西,然后,搞个版本,哎 ~ |
我用1.1.20这版本还是有这个问题。什么时候才修复这个bug |
1.1.20版本还有这个问题 |
1.1.21还是存在这个问题 mybatis用的是3.5.3 |
调试了半小时成功了,有个坑在这里,我用的是druid1.1.21 mybatis-plus 3.3.0 最重要的是驱动,mysql是8+ oracle是ojdbc8(12c版本) 驱动低了都不行 |
是的,这个还和驱动的版本有关系,我之前用pg的时候也遇到了的,其实有些驱动低层做了一些处理,所以出了问题,还是自己debug调试,找到问题的关键点 ~ |
我用的mybatis3.5.3 和 alibaba1.1.18。mysql驱动8.0.16。没有错误,正常。 |
DruidPooledResultSet这个类的getObject方法
public T getObject(String columnLabel, Class type) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
mybatis中的LocalDateTimeTypeHandler调用getNullableResult
public LocalDateTime getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return (LocalDateTime)rs.getObject(columnIndex, LocalDateTime.class);
}
The text was updated successfully, but these errors were encountered: