Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mapper.selectByPrimaryKey() throw ClassCastException #185

Closed
RisenZhong opened this issue Mar 30, 2020 · 3 comments
Closed

Mapper.selectByPrimaryKey() throw ClassCastException #185

RisenZhong opened this issue Mar 30, 2020 · 3 comments

Comments

@RisenZhong
Copy link

image

mybatis(mybatis-spring-boot-starter:1.3.5):3.4.6
mybatis-generator-core:1.4.0
mybatis-dynamic-sql:1.1.4

when I upgrade mybatis to 3.5.4, I got another error:
java.sql.SQLException: Conversion not supported for type java.time.LocalDateTime
image

@RisenZhong
Copy link
Author

I used to use following versions, everything works fine :
mybatis(mybatis-spring-boot-starter:1.3.5):3.4.6
mybatis-generator-core:1.3.7
mybatis-dynamic-sql:1.1.2

@lany192
Copy link

lany192 commented Mar 30, 2020

I had the same problem, what happened?

@jeffgbutler
Copy link
Member

There was a change in MyBatis version 3.5.1 in this area. MyBatis now requires a JDBC driver that implements JDBC 4.2. Make sure you've upgrade your JDBC driver. According to the following thread, it should work with connector-java 8.0.19: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/mybatis-user/NowScQE4_zc/zV7xkyOlBAAJ

It is related to the following change in MyBatis: mybatis/mybatis-3#1478

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants