simple query: not implemented by SQLite JDBC driver
This was a simple cut/paste style error. When using prepared statements, you shouldn't then pass the SQL into the executeQuery
.
Change:
try(ResultSet rs = stmt.executeQuery(sql)){
To:
try(ResultSet rs = stmt.executeQuery()){
This was overriding the preparedStatement
.
What it was complaining about was executing a query with a '?' in it since it wasn't the prepared query.