Skip to content
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

Cast Exception Problem for MySQL driver 8.X possible #316

Open
mumitr0ll opened this issue Jan 23, 2019 · 0 comments
Open

Cast Exception Problem for MySQL driver 8.X possible #316

mumitr0ll opened this issue Jan 23, 2019 · 0 comments

Comments

@mumitr0ll
Copy link

mumitr0ll commented Jan 23, 2019

Using sql2o extensively on Ubuntu 16 and 18 with MySQL . No issues. However, all of the uses there are with mysql-connector-java 5.1.X - the standard for a while.

My colleague has a new Mac and is using the MySQL driver mysql-connector-java 8.0.13. Now the INSERT with sql2o work, but the objects returned from the reading of the just inserted objects fails. Specifically, the casts are failing for the auto-increment columns in Java with the message "Can't Cast BIGINTEGER to LONG". I looked at the Javadoc for sql2o and I don't see a BigInteger converter. Are we missing something or is this an actual worry? MySQL connector page recommends the use of connector 8.

**EDIT - I should mention that we are using auto-increment on INT Unsigned for the key. That appears to be the possible problem. Please let me know.

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

No branches or pull requests

1 participant