Java Exception Error - Sqlite preparedStatement.setBlob Java Exception Error - Sqlite preparedStatement.setBlob sqlite sqlite

Java Exception Error - Sqlite preparedStatement.setBlob


According to a recent post Xerial group the method setBlob is not implemented in sqlite-jdbc. For me, the proposed alternative

preparedStatement.setBytes(idx, data)

worked fine, if your binary data is small enough to load into memory as byte array.


Try using the 'count' field to get the length of your ByteArrayInputStream object, bais, instead of the length of your decoded string.