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

'not implemented by SQLite JDBC driver' error with the driver org.xerial.sqlite-jdbc 3.43.0.0 #288

Open
zonex5 opened this issue Sep 3, 2023 · 4 comments

Comments

@zonex5
Copy link

zonex5 commented Sep 3, 2023

Related to the latest changes: xerial/sqlite-jdbc#329

Exception in thread "main" java.sql.SQLException: Unable to run insert stmt on object Category(id=0, name=John): INSERT INTO category (name ) VALUES (?)
at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:139)
at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:464)
at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:337)
at com.j256.ormlite.dao.BaseDaoImpl.createIfNotExists(BaseDaoImpl.java:381)
at xyz.toway.tools.Main.main(Main.java:9)
Caused by: java.sql.SQLFeatureNotSupportedException: not implemented by SQLite JDBC driver
at org.sqlite.jdbc3.JDBC3PreparedStatement.unsupported(JDBC3PreparedStatement.java:448)
at org.sqlite.jdbc3.JDBC3Statement.getGeneratedKeys(JDBC3Statement.java:357)
at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:188)
at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
... 4 more

@sproket
Copy link

sproket commented Sep 4, 2023

Thanks I created this bug as well. PITA. This breaks my library tests. I'll have to stick with an older version for my tests and have a note about this in my release notes.

@j256
Copy link
Owner

j256 commented Sep 8, 2023

Sorry for this @sproket . Can you provide more details if ORMLite is doing something wrong? What's the fix? Upgrade to a later version of the xerial?

@sproket
Copy link

sproket commented Sep 9, 2023

No it's Persism https://github.com/sproket/Persism - I was using getGeneratedKeys prior since some DBs don't support RETURNING clause. It's fine though. I updated the library to use the returning method to get the auto-inc back and it's working. I'm going to put up a new release soon. Thanks! (sorry I commented on this link where I should have commented on the original).

@Phoenix616
Copy link

Solved now in xerial sqlite jdbc with https://github.com/xerial/sqlite-jdbc/releases/tag/3.45.0.0

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

4 participants